DanWard Posted February 28, 2010 Share Posted February 28, 2010 Ive tried it a couple of times but I am still getting 58 errors, no matter what i do. 1>c:\users\daniel\desktop\test\window.cpp(42) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\daniel\desktop\test\window.cpp(48) : error C2664: 'LoadImageW' : cannot convert parameter 2 from 'const str' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\daniel\desktop\test\window.cpp(50) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\daniel\desktop\test\window.cpp(56) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [19]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>test.cpp 1>c:\users\daniel\desktop\test\test.cpp(5) : error C2065: 'TGame' : undeclared identifier 1>c:\users\daniel\desktop\test\test.cpp(5) : error C2146: syntax error : missing ';' before identifier 'game' 1>c:\users\daniel\desktop\test\test.cpp(5) : error C2065: 'game' : undeclared identifier 1>c:\users\daniel\desktop\test\test.cpp(9) : error C2065: 'game' : undeclared identifier 1>c:\users\daniel\desktop\test\test.cpp(9) : error C2228: left of '.Initialize' must have class/struct/union 1> type is ''unknown-type'' 1>c:\users\daniel\desktop\test\test.cpp(12) : error C2065: 'game' : undeclared identifier 1>c:\users\daniel\desktop\test\test.cpp(12) : error C2228: left of '.scene' must have class/struct/union 1> type is ''unknown-type'' 1>c:\users\daniel\desktop\test\test.cpp(12) : error C2228: left of '.LoadMap' must have class/struct/union 1>c:\users\daniel\desktop\test\test.cpp(13) : error C2065: 'game' : undeclared identifier 1>c:\users\daniel\desktop\test\test.cpp(13) : error C2228: left of '.scene' must have class/struct/union 1> type is ''unknown-type'' 1>c:\users\daniel\desktop\test\test.cpp(13) : error C2228: left of '.SetCurrentPlayer' must have class/struct/union 1>c:\users\daniel\desktop\test\test.cpp(14) : error C2065: 'game' : undeclared identifier 1>c:\users\daniel\desktop\test\test.cpp(14) : error C2228: left of '.scene' must have class/struct/union 1> type is ''unknown-type'' They are a few of them. Help appreciated. Thanks, Dan Quote Windows 7 Ultimate 64bit; i7 920 2.8 Ghz; 6Gb RAM; 2x 5770 Raedeon HD cards in CrossFireX; Link to comment Share on other sites More sharing options...
Chiblue Posted February 28, 2010 Share Posted February 28, 2010 Are you creating a win 32 app or a console app? I don't know if Gamelib works with win apps, I have been using gamelib for a few weeks and works fine with the console... this first few messages are windows messages you probably need to include windows.h, although I am not sure what version you are running... Also what c ompiler IDE are you using, also what version of the LE engine are you using? Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
DanWard Posted February 28, 2010 Author Share Posted February 28, 2010 I'm using windows, I found a way around it. You have to change the character set from Unicode to Multi-byte. Compiler is Visual Studio 2008 C++ and Leadwerks 2.31 with the 2.3 leoFramewerk leoLayer leoRenderer files. I fixed all the problems, cept now I get "Unable to load icon resource 100" "Icon image is NULL" Quote Windows 7 Ultimate 64bit; i7 920 2.8 Ghz; 6Gb RAM; 2x 5770 Raedeon HD cards in CrossFireX; Link to comment Share on other sites More sharing options...
Chiblue Posted February 28, 2010 Share Posted February 28, 2010 The problem is that turning of unicode changes the main entry function for the application, and the IDE, if you ar eusing VS or VC express does not resolve this for you... My suggestion would be to go back and recreate your project as a console application (32 bit) and then add the includes and copy DLLs for the engine... also you will need the SDK and opengl addins... Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
DanWard Posted February 28, 2010 Author Share Posted February 28, 2010 Ok, I did that and now it wont compile. Errors: 1>c:\users\daniel\desktop\test\window.cpp(42) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\daniel\desktop\test\window.cpp(48) : error C2664: 'LoadImageW' : cannot convert parameter 2 from 'const str' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\daniel\desktop\test\window.cpp(50) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\daniel\desktop\test\window.cpp(56) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [19]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Quote Windows 7 Ultimate 64bit; i7 920 2.8 Ghz; 6Gb RAM; 2x 5770 Raedeon HD cards in CrossFireX; Link to comment Share on other sites More sharing options...
Chiblue Posted February 28, 2010 Share Posted February 28, 2010 Did you create a new project? I am not sure where windows.cpp is coming from? Did you turn of pre-compiled headers... Did you try this tutorial, this worked for me then I extended it.... Gamelib Tutorial The above tutorial is extremely helpful.. Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Canardia Posted February 28, 2010 Share Posted February 28, 2010 Those errors come from the old LEO files in LE 2.31, to fix it see this post: http://leadwerks.com/werkspace/index.php?/topic/1271-2-31-does-not-work-with-gamelib/page__view__findpost__p__11723 Character set should be always: Not Set. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
DanWard Posted March 2, 2010 Author Share Posted March 2, 2010 Thanks, turning it to Not-Set worked it for me. One thing though. I get this: 1>Linking... 1>leo.obj : error LNK2005: "bool LEO::g_engineLoaded" (?g_engineLoaded@LEO@@3_NA) already defined in Gamelib.obj 1>leo.obj : error LNK2005: "private: static int LEO::Engine::instances" (?instances@Engine@LEO@@0HA) already defined in Gamelib.obj 1>.\sceneloading-Debug.exe : fatal error LNK1169: one or more multiply defined symbols found Any ideas? Thanks, Dan Quote Windows 7 Ultimate 64bit; i7 920 2.8 Ghz; 6Gb RAM; 2x 5770 Raedeon HD cards in CrossFireX; Link to comment Share on other sites More sharing options...
Canardia Posted March 2, 2010 Share Posted March 2, 2010 When using gamelib, make sure you don't have engine.cpp or leo.cpp added to the project, since gamelib will add them automatically. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
DanWard Posted March 2, 2010 Author Share Posted March 2, 2010 Thanks, That worked lol.I didn't think of that :S. Thanks, Dan Quote Windows 7 Ultimate 64bit; i7 920 2.8 Ghz; 6Gb RAM; 2x 5770 Raedeon HD cards in CrossFireX; Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.