Jump to content

GameLib Errors


DNC
 Share

Recommended Posts

I am not about to post the complete error log here because it would probably crash your browser. :) I have asked before if Gamelib is compatible. As far as I can tell I have everything set right in the environment as I have triple checked. What could be the problem here?


1>------ Build started: Project: Test, Configuration: Debug Win32 ------
1>Compiling...
1>engine.cpp
1>leo.cpp
1>LEO Leadwerk Engine Objects, version 2.4.0.
1>Test.cpp
1>gamelib.cpp
1>LEO Leadwerk Engine Objects, version 2.4.0.
1>c:\gamelib_0.1.1.2\typewriter.cpp(10) : warning C4305: 'argument' : truncation from 'double' to 'LE::flt'
1>c:\gamelib_0.1.1.2\gamelib.cpp(714) : warning C4244: 'argument' : conversion from 'double' to 'LE::flt', possible loss of data
1>c:\gamelib_0.1.1.2\gamelib.cpp(714) : warning C4244: 'argument' : conversion from 'double' to 'LE::flt', possible loss of data
1>c:\gamelib_0.1.1.2\gamelib.cpp(714) : warning C4244: 'argument' : conversion from 'double' to 'LE::flt', possible loss of data
1>c:\gamelib_0.1.1.2\gamelib.cpp(805) : warning C4244: 'argument' : conversion from 'double' to 'LE::flt', possible loss of data
1>c:\gamelib_0.1.1.2\gamelib.cpp(840) : warning C4244: 'argument' : conversion from 'double' to 'LE::flt', possible loss of data
1>c:\gamelib_0.1.1.2\gamelib.cpp(840) : warning C4244: 'argument' : conversion from 'double' to 'LE::flt', possible loss of data
1>c:\gamelib_0.1.1.2\gamelib.cpp(840) : warning C4244: 'argument' : conversion from 'double' to 'LE::flt', possible loss of data
1>c:\gamelib_0.1.1.2\gamelib.cpp(1884) : warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data
1>Generating Code...
1>Compiling resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>gamelib.obj : error LNK2005: "int __cdecl LE::sgn(float)" (?sgn@LE@@YAHM@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "struct LE::TVec2 __cdecl LE::Vec2(float,float)" (?Vec2@LE@@YA?AUTVec2@1@MM@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "struct LE::TVec3 __cdecl LE::Vec3(float,float,float)" (?Vec3@LE@@YA?AUTVec3@1@MMM@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "struct LE::TVec4 __cdecl LE::Vec4(float,float,float,float)" (?Vec4@LE@@YA?AUTVec4@1@MMMM@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "struct LE::TVec6 __cdecl LE::Vec6(float,float,float,float,float,float)" (?Vec6@LE@@YA?AUTVec6@1@MMMMMM@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "struct LE::TVec9 __cdecl LE::Vec9(float,float,float,float,float,float,float,float,float)" (?Vec9@LE@@YA?AUTVec9@1@MMMMMMMMM@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "struct LE::TVec16 __cdecl LE::Vec16(float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float)" (?Vec16@LE@@YA?AUTVec16@1@MMMMMMMMMMMMMMMM@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "float __cdecl LE::Curve(float,float,float)" (?Curve@LE@@YAMMMM@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "float __cdecl LE::Clamp(float,float,float)" (?Clamp@LE@@YAMMMM@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "float __cdecl LE::PlaneDistanceToPoint(struct LE::TVec4 const &,struct LE::TVec3 const &)" (?PlaneDistanceToPoint@LE@@YAMABUTVec4@1@ABUTVec3@1@@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "void __cdecl LE::ExitFunc(struct HINSTANCE__ *,char *)" (?ExitFunc@LE@@YAXPAUHINSTANCE__@@PAD@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "double __cdecl LE::FPS(void)" (?FPS@LE@@YANXZ) already defined in engine.obj
1>gamelib.obj : error LNK2005: "int __cdecl LE::Initialize(int)" (?Initialize@LE@@YAHH@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "int __cdecl LE::LoadFuncs(void)" (?LoadFuncs@LE@@YAHXZ) already defined in engine.obj
1>gamelib.obj : error LNK2005: "int __cdecl LE::Terminate(void)" (?Terminate@LE@@YAHXZ) already defined in engine.obj
1>gamelib.obj : error LNK2005: "int __cdecl LE::Graphics(int,int,int,int,int)" (?Graphics@LE@@YAHHHHHH@Z) already defined in engine.obj
1>gamelib.obj : error LNK2005: "unsigned char * __cdecl LE::CreateBuffer(int,int,int)" (?CreateBuffer@LE@@YAPAEHHH@Z) already defined in engine.obj

1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>.\Test-Debug.exe : fatal error LNK1120: 1 unresolved externals
1>Test - 857 error(s), 9 warning(s)




LE 2.43 | BlitzMax 1.42 | Windows 7 - 64 Bit

Link to comment
Share on other sites

This error tells it all: "already defined in engine.obj".

It means you must not include engine.cpp and leo.cpp when using gamelib.cpp.

 

There is also a tutorial how to setup a Code::Blocks projects with engine, LEO or gamelib:

http://www.leadwerks.com/werkspace/page/Documentation/LE2/tutorials/_/programming/cpp/gamelib-tutorials-r70

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 ■

Link to comment
Share on other sites

This error tells it all: "already defined in engine.obj".

It means you must not include engine.cpp and leo.cpp when using gamelib.cpp.

 

There is also a tutorial how to setup a Code::Blocks projects with engine, LEO or gamelib:

http://www.leadwerks.com/werkspace/page/Documentation/LE2/tutorials/_/programming/cpp/gamelib-tutorials-r70

 

 

OK, great. I thought this might be the problem, but i wasn't sure. It is working now. I appreciate your help and for the great library. It has some nice fun-filled functions inside.:)

LE 2.43 | BlitzMax 1.42 | Windows 7 - 64 Bit

Link to comment
Share on other sites

  • 3 months later...

The sqlite3.o file should be in your project's lib directory, and the gamelib cube template should copy it there.

At least the template works for me.

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 ■

Link to comment
Share on other sites

The template puts sqlite3.o in source/H/lib/sqlite3, I can point to this now. I do not have a H: drive, so I am changing this to C:/lib in the parameter setting in LEBuilder. Its all confused on my system (in my head), now i get to 50 errors with undefined references in C:\lib\freeglut\include\freeglut_std.h & c:\lib\gamelib\gamelib.cpp. I'd really like to try gamelib, might give it a miss for now & wait for future examples. Thanks for your fast reply Metatron

Link to comment
Share on other sites

  • 1 month later...

You can just copy it over where it wants it. In this case it seems to want it in your source code directory under a subfolder dev/sqlite3/

And yeah, I really need to fix the template so that it does this 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 ■

Link to comment
Share on other sites

mingw32-g++.exe: error: .\le\Tergus\source\dev\sqlite3\sqlite3.o: No such file or directory

 

nope thats not it.. sometimes I hate trying to use different compilers.... It sees the file, but for some reason it thinks its not there.. :)

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Link to comment
Share on other sites

I think you have an older version of mingw, you should install mingw first, and then codeblocks without mingw version. The mingw which comes with codeblocks is very old.

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 ■

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...