Problems compiling TGB 1.7.2
by Todd D. Degani · in Torque Game Builder · 03/16/2008 (2:39 pm) · 7 replies
Just started getting back into TGB and having problems getting 1.7.2 to build on VS 2008 Pro.
I have the latest windows sdk installed (v6.1).
I checked my directory options to make sure the paths were pointed to correctly.
$(WindowsSDKDir) = C:\Program Files\Microsoft SDKs\Windows\v6.1\ in the registry under My Computer\HKEY_CURRENT_USER\Software\Microsoft\Microsoft SDKs\Windows\CurrentInstallFolder
$(VCInstallDir) = c:\program files\microsoft visual studio 9.0\
I cannot seem to track down how to fix the parameter type mismatches. I get this trying to build both release and debug builds. Any ideas? A snip of the error log follows, all the same problems with parameters not matching. Thanks.
-Todd
EDIT: This is using the .NET solution using autoconvert to 2008.
Error 1 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\nativedialogs\win32msgbox.cpp 76
Error 6 error C2665: 'convertUTF16toUTF8' : none of the 2 overloads could convert all the argument types c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\nativedialogs\filedialog.cc 91
Error 7 error C2440: '=' : cannot convert from 'UTF16 [260]' to 'LPWSTR' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\nativedialogs\filedialog.cc 172
Error 8 error C2440: '=' : cannot convert from 'UTF16 [260]' to 'LPWSTR' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\nativedialogs\filedialog.cc 310
Error 13 error C2440: 'initializing' : cannot convert from 'const wchar_t [22]' to 'const UTF16 *' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winwindow.cc 38
Error 14 error C2440: 'initializing' : cannot convert from 'const wchar_t [16]' to 'UTF16 [256]' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winwindow.cc 39
Error 15 error C2664: 'CreateMutexW' : cannot convert parameter 3 from 'UTF16 [512]' to 'LPCWSTR' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winwindow.cc 146
Error 18 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPCWSTR' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winwindow.cc 282
Error 21 error C2664: 'ToUnicode' : cannot convert parameter 4 from 'U16 [3]' to 'LPWSTR' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winwindow.cc 537
I have the latest windows sdk installed (v6.1).
I checked my directory options to make sure the paths were pointed to correctly.
$(WindowsSDKDir) = C:\Program Files\Microsoft SDKs\Windows\v6.1\ in the registry under My Computer\HKEY_CURRENT_USER\Software\Microsoft\Microsoft SDKs\Windows\CurrentInstallFolder
$(VCInstallDir) = c:\program files\microsoft visual studio 9.0\
I cannot seem to track down how to fix the parameter type mismatches. I get this trying to build both release and debug builds. Any ideas? A snip of the error log follows, all the same problems with parameters not matching. Thanks.
-Todd
EDIT: This is using the .NET solution using autoconvert to 2008.
Error 1 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\nativedialogs\win32msgbox.cpp 76
Error 6 error C2665: 'convertUTF16toUTF8' : none of the 2 overloads could convert all the argument types c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\nativedialogs\filedialog.cc 91
Error 7 error C2440: '=' : cannot convert from 'UTF16 [260]' to 'LPWSTR' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\nativedialogs\filedialog.cc 172
Error 8 error C2440: '=' : cannot convert from 'UTF16 [260]' to 'LPWSTR' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\nativedialogs\filedialog.cc 310
Error 13 error C2440: 'initializing' : cannot convert from 'const wchar_t [22]' to 'const UTF16 *' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winwindow.cc 38
Error 14 error C2440: 'initializing' : cannot convert from 'const wchar_t [16]' to 'UTF16 [256]' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winwindow.cc 39
Error 15 error C2664: 'CreateMutexW' : cannot convert parameter 3 from 'UTF16 [512]' to 'LPCWSTR' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winwindow.cc 146
Error 18 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPCWSTR' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winwindow.cc 282
Error 21 error C2664: 'ToUnicode' : cannot convert parameter 4 from 'U16 [3]' to 'LPWSTR' c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winwindow.cc 537
#2
Anyone have a clue what I may have setup incorrectly that I needed to jump through all these hoops? My biggest concern is that there may be ramifications further down the road but fairly unlikely.
03/16/2008 (4:53 pm)
So to get around the WINVER issue, I ended up defining WINVER=0x0501 as a preprocessor definition in the settings of the project.Anyone have a clue what I may have setup incorrectly that I needed to jump through all these hoops? My biggest concern is that there may be ramifications further down the road but fairly unlikely.
#3
03/17/2008 (12:52 pm)
Well I thought that this would work but even though it compiles I am starting to see some crashes (with the demos as I havent written any code yet for anything), when I get home I can detail them a bit further as to whats causing them.
#4
03/18/2008 (7:12 am)
Try using the older Platform SDK. I compiled it with 2008 (express because that's what's on this computer) using the older version and it worked. I also sent you an e-mail about it as well.
#6
I installed Microsoft Windows Server 2003 R2 Platform SDK Web Install located here.
Then using the 2005 project converted to 2008 it compiled perfectly.
You also need to remember to put the include, lib, etc directories before the other SDK's in the settings.
03/19/2008 (5:44 pm)
Well after talking with David we seem to have this sorted out.I installed Microsoft Windows Server 2003 R2 Platform SDK Web Install located here.
Then using the 2005 project converted to 2008 it compiled perfectly.
You also need to remember to put the include, lib, etc directories before the other SDK's in the settings.
#7
03/19/2008 (6:10 pm)
Oh yes, and the crashing problems I was getting seem to be related to running with two monitors. I didnt track down the exact cause but setting my machine up for single monitor displayed got rid of the issue. I still have some sort of weird crash issue when exiting TGB but I havent looked into that.
Torque Owner Todd D. Degani
Now I get errors related to WINVER
Error 1 error C2065: 'MIIM_STRING' : undeclared identifier c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\menus\popupmenuwin32.cc 216
Error 2 error C2065: 'MIIM_STRING' : undeclared identifier c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\menus\popupmenuwin32.cc 293
Error 3 error C2065: 'MIIM_STRING' : undeclared identifier c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\menus\popupmenuwin32.cc 216
Error 4 error C2065: 'MIIM_STRING' : undeclared identifier c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\menus\popupmenuwin32.cc 293
Error 5 error C2065: 'AW_BLEND' : undeclared identifier c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winoglvideo.cc 858
Error 6 error C3861: 'AnimateWindow': identifier not found c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winoglvideo.cc 858
Error 7 error C2065: 'AW_BLEND' : undeclared identifier c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winoglvideo.cc 858
Error 8 error C3861: 'AnimateWindow': identifier not found c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\winoglvideo.cc 858
Error 9 error C3861: 'EnumDisplayDevices': identifier not found c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\cardprofile.cpp 14
Error 10 fatal error C1903: unable to recover from previous error(s); stopping compilation c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\cardprofile.cpp 14
Error 11 error C3861: 'EnumDisplayDevices': identifier not found c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\cardprofile.cpp 14
Error 12 fatal error C1903: unable to recover from previous error(s); stopping compilation c:\program files\garagegames\torquegamebuilder-1.7.2\engine\source\platformwin32\cardprofile.cpp 14
Error 13 error BK1506 : cannot open file '..\..\Link\Debug.Win32\TGBGame\cardProfile.sbr': No such file or directory BSCMAKE
Error 14 error BK1506 : cannot open file '..\..\Link\Debug.Win32\TorqueGameBuilder\cardProfile.sbr': No such file or directory BSCMAKE