Jump to content

Recommended Posts

Posted

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

Windows 7 Ultimate 64bit; i7 920 2.8 Ghz; 6Gb RAM; 2x 5770 Raedeon HD cards in CrossFireX;

Posted

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?

If it's not Tactical realism then you are just playing..

Posted

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"

Windows 7 Ultimate 64bit; i7 920 2.8 Ghz; 6Gb RAM; 2x 5770 Raedeon HD cards in CrossFireX;

Posted

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...

If it's not Tactical realism then you are just playing..

Posted

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

Windows 7 Ultimate 64bit; i7 920 2.8 Ghz; 6Gb RAM; 2x 5770 Raedeon HD cards in CrossFireX;

Posted

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..

If it's not Tactical realism then you are just playing..

Posted

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.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Posted

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

Windows 7 Ultimate 64bit; i7 920 2.8 Ghz; 6Gb RAM; 2x 5770 Raedeon HD cards in CrossFireX;

Posted

When using gamelib, make sure you don't have engine.cpp or leo.cpp added to the project, since gamelib will add them automatically.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Posted

Thanks, That worked lol.I didn't think of that :S.

 

Thanks,

Dan

Windows 7 Ultimate 64bit; i7 920 2.8 Ghz; 6Gb RAM; 2x 5770 Raedeon HD cards in CrossFireX;

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...