DNC Posted July 22, 2011 Share Posted July 22, 2011 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) Quote LE 2.43 | BlitzMax 1.42 | Windows 7 - 64 Bit Link to comment Share on other sites More sharing options...
Canardia Posted July 22, 2011 Share Posted July 22, 2011 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 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...
DNC Posted July 22, 2011 Author Share Posted July 22, 2011 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. Quote LE 2.43 | BlitzMax 1.42 | Windows 7 - 64 Bit Link to comment Share on other sites More sharing options...
Canardia Posted July 22, 2011 Share Posted July 22, 2011 I'm starting now to make some small games with gamelib, since it needs some good examples. Documentation alone is not enough. 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...
Dozz Posted November 13, 2011 Share Posted November 13, 2011 After installing GameLib & Code::Blocks, I am having a problem to run the cube template code. I have attached a screenshot showing the error. Thx for any help, Dozz Quote Link to comment Share on other sites More sharing options...
Canardia Posted November 13, 2011 Share Posted November 13, 2011 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. 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...
Dozz Posted November 13, 2011 Share Posted November 13, 2011 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 Quote Link to comment Share on other sites More sharing options...
Canardia Posted November 14, 2011 Share Posted November 14, 2011 I think I should not use my H: drive in the templates I will fix the templates to use C: drive. 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...
VicToMeyeZR Posted December 29, 2011 Share Posted December 29, 2011 I guess you forgot to fix this? One other thing, none of the #includes work without full path names? #include "gl/glut.h" where is that file? I don't know the reference Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
Canardia Posted December 29, 2011 Share Posted December 29, 2011 gl/glut.h comes automatically with the mingw installer. For VS you have to download glut manually. 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...
VicToMeyeZR Posted December 29, 2011 Share Posted December 29, 2011 ok. will have to look at why code blocks isn't using the include correctly then and compile time? Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted December 29, 2011 Share Posted December 29, 2011 mingw32-g++.exe: error: .\dev\sqlite3\sqlite3.o: No such file or directory How do I tell mingw where this file is..? I have it in c:\dev\sqlite3\ Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
Canardia Posted December 29, 2011 Share Posted December 29, 2011 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 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...
VicToMeyeZR Posted December 29, 2011 Share Posted December 29, 2011 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.. Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
Canardia Posted December 29, 2011 Share Posted December 29, 2011 You could try just adding the sqlite3.cpp into your project. 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...
VicToMeyeZR Posted December 29, 2011 Share Posted December 29, 2011 I dunno.. maybe I will try the sqlite source from the site.. Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
VicToMeyeZR Posted December 29, 2011 Share Posted December 29, 2011 My codeblocks install just does not like the sqlite3.o file... I don't what I have setup wrong, but it just will not accept it Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
Canardia Posted December 29, 2011 Share Posted December 29, 2011 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. 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...
VicToMeyeZR Posted December 29, 2011 Share Posted December 29, 2011 Thats the way I did it.. I will try it again though Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
Canardia Posted December 29, 2011 Share Posted December 29, 2011 Then you should just delete the old sqlite3.o and create it again by compiling sqlite3.cpp. 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...
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.