Help compiling 1.4
by Keith Watt · in Torque Game Engine · 11/23/2005 (11:31 am) · 14 replies
Hi,
I was able to compile 1.3 (debug config only). I installed 1.4, but I get the following errors:
Error 77 error C2440: 'initializing' : cannot convert from 'const wchar_t [22]' to 'const UTF16 *' d:\torque\sdk\engine\platformwin32\winwindow.cc 33
Error 78 error C2440: 'initializing' : cannot convert from 'const wchar_t [16]' to 'UTF16 [256]' d:\torque\sdk\engine\platformwin32\winwindow.cc 34
Error 79 error C2664: 'CreateMutexW' : cannot convert parameter 3 from 'UTF16 [512]' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 109
Error 80 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 134
Error 81 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 148
Error 82 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 162
Error 83 error C2664: 'ToUnicode' : cannot convert parameter 4 from 'U16 [3]' to 'LPWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 372
Error 84 error C2440: '=' : cannot convert from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 877
And more
Any ideas what causes these types of errors?
I was able to compile 1.3 (debug config only). I installed 1.4, but I get the following errors:
Error 77 error C2440: 'initializing' : cannot convert from 'const wchar_t [22]' to 'const UTF16 *' d:\torque\sdk\engine\platformwin32\winwindow.cc 33
Error 78 error C2440: 'initializing' : cannot convert from 'const wchar_t [16]' to 'UTF16 [256]' d:\torque\sdk\engine\platformwin32\winwindow.cc 34
Error 79 error C2664: 'CreateMutexW' : cannot convert parameter 3 from 'UTF16 [512]' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 109
Error 80 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 134
Error 81 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 148
Error 82 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 162
Error 83 error C2664: 'ToUnicode' : cannot convert parameter 4 from 'U16 [3]' to 'LPWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 372
Error 84 error C2440: '=' : cannot convert from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 877
And more
Any ideas what causes these types of errors?
About the author
#2
11/23/2005 (11:49 am)
I'm assuming there are no TBE / Eclipse ready makefiles ?
#3
I have Unicode defined as the character set on the project settings. Is this not kosher?
*EDIT* - I removed that setting for the project but I am still getting the same errors
Error 85 error C2440: '=' : cannot convert from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 877
Error 86 error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 918
Error 87 error C2665: 'convertUTF16toUTF8' : none of the 2 overloads could convert all the argument types d:\torque\sdk\engine\platformwin32\winwindow.cc 1423
Error 88 error C2664: 'CreateProcessW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 1464
Error 89 error C2440: 'initializing' : cannot convert from 'const wchar_t [28]' to 'const UTF16 *' d:\torque\sdk\engine\platformwin32\winwindow.cc 1473
Error 90 error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 1482
Error 91 error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 1505
11/23/2005 (11:49 am)
Sorry, forgot to mention that. I am using VS 2005 (production) Pro.I have Unicode defined as the character set on the project settings. Is this not kosher?
*EDIT* - I removed that setting for the project but I am still getting the same errors
Error 85 error C2440: '=' : cannot convert from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 877
Error 86 error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 918
Error 87 error C2665: 'convertUTF16toUTF8' : none of the 2 overloads could convert all the argument types d:\torque\sdk\engine\platformwin32\winwindow.cc 1423
Error 88 error C2664: 'CreateProcessW' : cannot convert parameter 2 from 'UTF16 [1024]' to 'LPWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 1464
Error 89 error C2440: 'initializing' : cannot convert from 'const wchar_t [28]' to 'const UTF16 *' d:\torque\sdk\engine\platformwin32\winwindow.cc 1473
Error 90 error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 1482
Error 91 error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 1505
#4
Error 78 error C2664: 'ToUnicode' : cannot convert parameter 4 from 'U16 [3]' to 'LPWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 372
Error 79 error C2665: 'convertUTF16toUTF8' : none of the 2 overloads could convert all the argument types d:\torque\sdk\engine\platformwin32\winwindow.cc 1423
Error 80 error C2440: 'initializing' : cannot convert from 'const char *' to 'char *' d:\torque\sdk\engine\platformwin32\winwindow.cc 1428
Error 84 error C2664: 'wcscmp' : cannot convert parameter 1 from 'const UTF16 *' to 'const wchar_t *' d:\torque\sdk\engine\platformwin32\winstrings.cc 118
Error 85 error C2664: 'wcslen' : cannot convert parameter 1 from 'const UTF16 *' to 'const wchar_t *' d:\torque\sdk\engine\platformwin32\winstrings.cc 168
Error 86 error C2664: 'WideCharToMultiByte' : cannot convert parameter 3 from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winstrings.cc 389
Error 87 error C2664: 'MultiByteToWideChar' : cannot convert parameter 5 from 'UTF16 *' to 'LPWSTR' d:\torque\sdk\engine\platformwin32\winstrings.cc 401
Error 117 error C2664: 'GetTextExtentPoint32W' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winfont.cc 321
11/23/2005 (12:09 pm)
Here's an update. I removed the UNICODE preproc directive as well as commenting out the unicode #define in TorqueConfig.H. I am getting the following errors:Error 78 error C2664: 'ToUnicode' : cannot convert parameter 4 from 'U16 [3]' to 'LPWSTR' d:\torque\sdk\engine\platformwin32\winwindow.cc 372
Error 79 error C2665: 'convertUTF16toUTF8' : none of the 2 overloads could convert all the argument types d:\torque\sdk\engine\platformwin32\winwindow.cc 1423
Error 80 error C2440: 'initializing' : cannot convert from 'const char *' to 'char *' d:\torque\sdk\engine\platformwin32\winwindow.cc 1428
Error 84 error C2664: 'wcscmp' : cannot convert parameter 1 from 'const UTF16 *' to 'const wchar_t *' d:\torque\sdk\engine\platformwin32\winstrings.cc 118
Error 85 error C2664: 'wcslen' : cannot convert parameter 1 from 'const UTF16 *' to 'const wchar_t *' d:\torque\sdk\engine\platformwin32\winstrings.cc 168
Error 86 error C2664: 'WideCharToMultiByte' : cannot convert parameter 3 from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winstrings.cc 389
Error 87 error C2664: 'MultiByteToWideChar' : cannot convert parameter 5 from 'UTF16 *' to 'LPWSTR' d:\torque\sdk\engine\platformwin32\winstrings.cc 401
Error 117 error C2664: 'GetTextExtentPoint32W' : cannot convert parameter 2 from 'const UTF16 *' to 'LPCWSTR' d:\torque\sdk\engine\platformwin32\winfont.cc 321
#5
Thanks!
11/23/2005 (12:45 pm)
Any ideas? I've poked around just about everywhere I could think of - but then I really don't know much about C++...Thanks!
#6
11/23/2005 (2:16 pm)
Has anyone actually been able to compile this thing in VS2005? One would think after installing the SDK, the solution would just be able to cleanly compile. Getting a bit frustrated here
#7
11/23/2005 (2:31 pm)
I had no problem in 2003, but I haven't used 2005 to compile it. Perhaps something got munged in the project file conversion.
#8
In the Source Explorer. Right Click on Torque Demo --> Properties
Go to Configuration Properties --> C/C++ --> Language
Find the property titled Treat wchar_t as Built-in Type and change it to No (/Zc:wchar_t-)
Make sure you hit Apply before Ok
I think GG needs to standardize on VS 2005 Express since it is freely available (for the Windows platform anyway). If that was the case, I'm sure this little bit of info would have been in the release notes thus saving me about 4 hours of head banging and cursing just to get the engine compiled. I think Torque is a great engine and worth the price, but every time I see GG say something like "over xyz amount of documentation available!" I feel this is misleading. Sure theres documentation, but guess what? It's spread out all over forums, PDFs, HTML pages, etc and good luck finding the info you need.
11/23/2005 (4:14 pm)
Thanks for the pointer David. I poked thru the conversion log and saw some stuff regarding wchar_t and investigated that further. I then found out that this step is required:In the Source Explorer. Right Click on Torque Demo --> Properties
Go to Configuration Properties --> C/C++ --> Language
Find the property titled Treat wchar_t as Built-in Type and change it to No (/Zc:wchar_t-)
Make sure you hit Apply before Ok
I think GG needs to standardize on VS 2005 Express since it is freely available (for the Windows platform anyway). If that was the case, I'm sure this little bit of info would have been in the release notes thus saving me about 4 hours of head banging and cursing just to get the engine compiled. I think Torque is a great engine and worth the price, but every time I see GG say something like "over xyz amount of documentation available!" I feel this is misleading. Sure theres documentation, but guess what? It's spread out all over forums, PDFs, HTML pages, etc and good luck finding the info you need.
#9
Just so you know - 1.4 does NOT ship with 2k5 Express support. We figured the lack of project files would be a tip off. :) Express was out & solid sufficiently late in the 1.4 dev cycle that we didn't have a chance to add support for it. The next release ought to have support, and I know that someone in the community has posted a resource on how to get things to compile cleanly. (This was one reason it wasn't a high priority task for us - there were already very good explanations from the community.)
In fact, blindly typing "2005 express" into the site search turns up as the second hit Compile TGE 1.4 with VS 2005 Beta 2, an excellent resource by community member Steven Beasley which has as step 3 the exact thing you just discovered. :)
So, while we certainly don't have a single monolithic cross-referenced exhaustic reference document/manual, I think we can feel pretty comfortable saying we have a lot of accessible documentation.
(I'll be honest here, since I was a little misleading - I did try "2005" as my search first, but I quickly realized that pulled up every page from the current calender year. So I added express, and that got it.)
On the subject of standardizing on 2k5, I think that's a great idea. It'll take a little while to update our tutorials, docs, and projects, so don't expect it to happen overnight, but we do definitely want to have a version of Torque that doesn't require lots of expensive tools!
11/23/2005 (6:50 pm)
Hey guys,Just so you know - 1.4 does NOT ship with 2k5 Express support. We figured the lack of project files would be a tip off. :) Express was out & solid sufficiently late in the 1.4 dev cycle that we didn't have a chance to add support for it. The next release ought to have support, and I know that someone in the community has posted a resource on how to get things to compile cleanly. (This was one reason it wasn't a high priority task for us - there were already very good explanations from the community.)
In fact, blindly typing "2005 express" into the site search turns up as the second hit Compile TGE 1.4 with VS 2005 Beta 2, an excellent resource by community member Steven Beasley which has as step 3 the exact thing you just discovered. :)
So, while we certainly don't have a single monolithic cross-referenced exhaustic reference document/manual, I think we can feel pretty comfortable saying we have a lot of accessible documentation.
(I'll be honest here, since I was a little misleading - I did try "2005" as my search first, but I quickly realized that pulled up every page from the current calender year. So I added express, and that got it.)
On the subject of standardizing on 2k5, I think that's a great idea. It'll take a little while to update our tutorials, docs, and projects, so don't expect it to happen overnight, but we do definitely want to have a version of Torque that doesn't require lots of expensive tools!
#10
Steven Beasley's resource is what I had finally come across to fix the problem. I had originally been using this resource:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5957
Which was quite good and got me through compiling 1.3 the other day. I didn't expect that there was actually another resource for that, so that was partly my fault. On the other hand, an effort needs to be made to consolidate and streamline these documents as they really should have been part of one solid resource for compiling using 2005. I'm considering putting together my own resource on the web for people using 2005 and torque, as well as some getting started info for new folks such as myself.
Standardization is great and I personally think 2005 Express is a great choice (although I don't use it myself, I use Professional as I use the Suite for day job work). You just can't beat Visual Studio and it's intellisense, maturity, excellent UI, etc let alone the price for Express :)
Anyway thanks again for the update and link Ben. 1.4 is actually compiling better than my 1.3 setup (I couldn't compile with release configuration).
Cheers and happy Thanksgiving!
11/24/2005 (6:10 am)
Thanks for the information and response Ben. I was a little bit frustrated last night after what felt like many hours of trying to accomplish a simple thing. Steven Beasley's resource is what I had finally come across to fix the problem. I had originally been using this resource:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5957
Which was quite good and got me through compiling 1.3 the other day. I didn't expect that there was actually another resource for that, so that was partly my fault. On the other hand, an effort needs to be made to consolidate and streamline these documents as they really should have been part of one solid resource for compiling using 2005. I'm considering putting together my own resource on the web for people using 2005 and torque, as well as some getting started info for new folks such as myself.
Standardization is great and I personally think 2005 Express is a great choice (although I don't use it myself, I use Professional as I use the Suite for day job work). You just can't beat Visual Studio and it's intellisense, maturity, excellent UI, etc let alone the price for Express :)
Anyway thanks again for the update and link Ben. 1.4 is actually compiling better than my 1.3 setup (I couldn't compile with release configuration).
Cheers and happy Thanksgiving!
#11
11/24/2005 (9:14 am)
I would like to know if TBE is working with 1.4 or if i'll have to wait somemore.
#12
make1 *** outGCC3.release torqueDemo.exe error
anyone got any ideas?
11/26/2005 (3:26 am)
I have gotten TBE to compile down to the final out.GCC3 release but then I get the error:make1 *** outGCC3.release torqueDemo.exe error
anyone got any ideas?
#13
While VS 2005 Express is a nice environment for developing a windows only game in a windows only environment, there is the distinct probability that VS 2005 Express will be supersceded by VS 2006 Express or VS 2007 Express, which will cost real money, or more likely not be able to cleanly import or export to and from the older / newer versions.
Raise your hand if you shelled out cash for VS 7.0 and almost the next day found out that 7.1 had come out and oh yeah, anyone who used 7.1 wouldn't be able to easily work with a person who used 7.0 ?
TBE has an active developer community, and for the most part if something can compile on TBE in windows, you can take the exact same .cdt and copy it into eclipse straight up in Linux or Mac, and have the game quickly ported from one platform to the other.
TBE is also free. AFAIK it will remain free.
So yes GG please do standardize on an IDE, standardize on the TBE, I mean, look we made it ourselves (well I wasn't personally involved but come on you know what I mean), and it's a really good environment that keeps fully with the spirit of the community.
11/26/2005 (5:42 am)
Honestly if GarageGames wants to standardize around a set of tools which is freely available, I think our own home grown TBE is by far and away a much better choice.While VS 2005 Express is a nice environment for developing a windows only game in a windows only environment, there is the distinct probability that VS 2005 Express will be supersceded by VS 2006 Express or VS 2007 Express, which will cost real money, or more likely not be able to cleanly import or export to and from the older / newer versions.
Raise your hand if you shelled out cash for VS 7.0 and almost the next day found out that 7.1 had come out and oh yeah, anyone who used 7.1 wouldn't be able to easily work with a person who used 7.0 ?
TBE has an active developer community, and for the most part if something can compile on TBE in windows, you can take the exact same .cdt and copy it into eclipse straight up in Linux or Mac, and have the game quickly ported from one platform to the other.
TBE is also free. AFAIK it will remain free.
So yes GG please do standardize on an IDE, standardize on the TBE, I mean, look we made it ourselves (well I wasn't personally involved but come on you know what I mean), and it's a really good environment that keeps fully with the spirit of the community.
#14
Thank you much for this tip, it resolved all of my 1.4 complilation errors on Visual Studio 2005 Standard
06/21/2006 (8:22 pm)
@Keith WattThank you much for this tip, it resolved all of my 1.4 complilation errors on Visual Studio 2005 Standard
Associate Ben Garney