Game Development Community

Compiling TLK 1.4 with VC++ 2005 Express

by Michael Branin · in Torque Game Engine · 03/24/2006 (11:16 am) · 11 replies

Anyone have a TLK 1.4 that will compile under Visual C++ 2005 Express? I can compile a Fresh Head of TGE with no issues what so ever but ... TLK will not compile at all.

#1
03/24/2006 (12:33 pm)
Yes. I found some instructions on how to compile Torque with C++ Express. And it worked. What problems are you having??
#2
03/24/2006 (8:50 pm)
I can compile Torque with no problems its the Lighting kit that I am having issues with heres some of the errors

winWindow.cc
..\engine\platformWin32\winWindow.cc(33) : error C2440: 'initializing' : cannot convert from 'const wchar_t [22]' to 'const UTF16 *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winWindow.cc(34) : error C2440: 'initializing' : cannot convert from 'const wchar_t [16]' to 'UTF16 [256]'
There is no context in which this conversion is possible
..\engine\platformWin32\winWindow.cc(109) : error C2664: 'CreateMutexW' : cannot convert parameter 3 from 'UTF16 [512]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winWindow.cc(134) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winWindow.cc(148) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winWindow.cc(162) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winWindow.cc(372) : error C2664: 'ToUnicode' : cannot convert parameter 4 from 'U16 [3]' to 'LPWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winWindow.cc(877) : error C2440: '=' : cannot convert from 'const UTF16 *' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winWindow.cc(918) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winWindow.cc(1423) : error C2665: 'convertUTF16toUTF8' : none of the 2 overloads could convert all the argument types
../engine\core/unicode.h(45): could be 'const U32 convertUTF16toUTF8(const UTF16 *,UTF8 *,U32)'
while trying to match the argument list '(wchar_t [512], char [512], int)'
..\engine\platformWin32\winWindow.cc(1464) : error C2664: 'CreateProcessW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winWindow.cc(1473) : error C2440: 'initializing' : cannot convert from 'const wchar_t [28]' to 'const UTF16 *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winWindow.cc(1482) : error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winWindow.cc(1505) : error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winWindow.cc(1527) : error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

winStrings.cc
..\engine\platformWin32\winStrings.cc(118) : error C2664: 'wcscmp' : cannot convert parameter 1 from 'const UTF16 *' to 'const wchar_t *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winStrings.cc(168) : error C2664: 'wcslen' : cannot convert parameter 1 from 'const UTF16 *' to 'const wchar_t *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winStrings.cc(389) : error C2664: 'WideCharToMultiByte' : cannot convert parameter 3 from 'const UTF16 *' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winStrings.cc(401) : error C2664: 'MultiByteToWideChar' : cannot convert parameter 5 from 'UTF16 *' to 'LPWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

winRedbook.cc
..\engine\platformWin32\winRedbook.cc(130) : error C2440: '=' : cannot convert from 'UTF16 [512]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

winGL.cc
..\engine\platformWin32\winGL.cc(352) : error C2664: 'LoadLibraryW' : cannot convert parameter 1 from 'UTF16 [1024]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winGL.cc(363) : error C2664: 'LoadLibraryW' : cannot convert parameter 1 from 'UTF16 [1024]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
winFont.cc
..\engine\platformWin32\winFont.cc(86) : error C2664: 'CreateFontW' : cannot convert parameter 14 from 'UTF16 [512]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winFont.cc(168) : error C2664: 'GetTextExtentPoint32W' : cannot convert parameter 2 from 'UTF16 *' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winFont.cc(221) : error C2664: 'CreateFontW' : cannot convert parameter 14 from 'UTF16 [512]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winFont.cc(321) : error C2664: 'GetTextExtentPoint32W' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
#3
03/24/2006 (8:50 pm)
WinFileio.cc
..\engine\platformWin32\winFileio.cc(128) : error C2664: 'CreateFileW' : cannot convert parameter 1 from 'UTF16 [2048]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winFileio.cc(137) : error C2664: 'CreateFileW' : cannot convert parameter 1 from 'UTF16 [2048]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winFileio.cc(146) : error C2664: 'CreateFileW' : cannot convert parameter 1 from 'UTF16 [2048]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winFileio.cc(155) : error C2664: 'CreateFileW' : cannot convert parameter 1 from 'UTF16 [2048]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winFileio.cc(437) : error C2664: 'FindFirstFileW' : cannot convert parameter 1 from 'UTF16 [1024]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winFileio.cc(445) : error C2665: 'convertUTF16toUTF8' : none of the 2 overloads could convert all the argument types
../engine\core/unicode.h(45): could be 'const U32 convertUTF16toUTF8(const UTF16 *,UTF8 *,U32)'
while trying to match the argument list '(WCHAR [260], UTF8 *, unsigned int)'
..\engine\platformWin32\winFileio.cc(509) : error C2664: 'FindFirstFileW' : cannot convert parameter 1 from 'UTF16 [512]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winFileio.cc(542) : error C2664: 'CreateDirectoryW' : cannot convert parameter 1 from 'UTF16 [1024]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winFileio.cc(640) : error C2664: 'FindFirstFileW' : cannot convert parameter 1 from 'UTF16 [512]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
..\engine\platformWin32\winFileio.cc(699) : error C2664: 'FindFirstFileW' : cannot convert parameter 1 from 'UTF16 [512]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

winDInputDevice.cc
..\engine\platformWin32\winDInputDevice.cc(562) : error C2665: 'convertUTF16toUTF8' : none of the 2 overloads could convert all the argument types
../engine\core/unicode.h(45): could be 'const U32 convertUTF16toUTF8(const UTF16 *,UTF8 *,U32)'
while trying to match the argument list '(WCHAR [260], UTF8 [512], unsigned int)'
..\engine\platformWin32\winDInputDevice.cc(574) : error C2665: 'convertUTF16toUTF8' : none of the 2 overloads could convert all the argument types
../engine\core/unicode.h(45): could be 'const U32 convertUTF16toUTF8(const UTF16 *,UTF8 *,U32)'
while trying to match the argument list '(WCHAR [260], UTF8 [512], unsigned int)'

winConsole.cc
..\engine\platformWin32\winConsole.cc(43) : error C2664: 'SetConsoleTitleW' : cannot convert parameter 1 from 'UTF16 [512]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
#4
03/24/2006 (8:50 pm)
Those are the remaining errors
#5
03/25/2006 (1:19 am)
Have you set Treat wchar_t as Built in Type to No ?? It's under Project Properties, Configuration Properties, C/C++, Language.
#6
03/25/2006 (4:41 pm)
Treat wchar_t as Built in Type id set to yes and I am still getting all those errors
#7
03/26/2006 (1:45 am)
I think that this is the instructions I followed.
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9253 Have you tried these??
#8
04/25/2006 (4:40 pm)
I was very successful following the Compile instructions on TDN for TGE 1.4
It was a breeze.

But!
Fresh Install of Visual Studio 2005
Fresh Install of TLK 1.4

#1)Tried Converting the VC7 - Wont Compile.
#2)Tried adding the http://tdn.garagegames.com/wiki/images/e/e8/TGE_VS2005.zip patch. - Wont Compile

I Know Im missing some obvious things.
I know that TGE Patch is probably missing some TLK Elements.
I use to use TBE, and am new to Visual Studio 2005.

Can someone spell out the required step by step instructions
on exactly how to get TLK 1.4 to Compile with Microsoft Visual C++ 2005 Express Edition.

Thanks

-Surge
#9
04/25/2006 (6:55 pm)
Ive expienced problems compiling TLK in VS2k5 as well. Ive used the patch found on TDN to make a VS project file.(found here tdn.garagegames.com/wiki/Torque/vs2k5))

All of my errors occur when linking *.obj files. Then engine still runs after the 191 erros occur, but Im not sure why. I was thinking it may be occuring when the complier is creating a debug version of TLK.

BTW: I am having no problems compiling toque without the TLK features.

Thanks for any input

- Dustin
#10
04/26/2006 (1:56 pm)
You need to start with a clean TGE 1.4 to make sure the TDN process works correctly for you.

If all goes well perform the same steps on TLK 1.4 and then add the TLK source files as outlined in the Developer's Guide section 'Adding TLK Files to the Torque Projects'.
#11
04/26/2006 (8:00 pm)
It went well thank you for the information.
Everything Compiles Great.

-Surge