Shard Posted April 30, 2010 Share Posted April 30, 2010 Hey guys, I've got a question for something that I should have done a long time ago. I need to link the required engine, framewerk and leo files so that Visual Studio knows where it is. So far, I've been copying those files over to my project directory but every time the engine updates, everything breaks and I get several errors in my code. Previously I've been told that I can fix this by linking my core files in the Leadwerks Directory, but I don't know exactly how to so if someone could show me it would be great. Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
Masterxilo Posted April 30, 2010 Share Posted April 30, 2010 Add the patha of <le root>/cpp and <le root>/cpp/leo to the VC++ include directories. Described here for example. Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Shard Posted May 1, 2010 Author Share Posted May 1, 2010 Add the patha of <le root>/cpp and <le root>/cpp/leo to the VC++ include directories. Described here for example. Thank you, works perfectly. Although, I still do have to copy over the dll's for engine, newton and jointlibrary. Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
Canardia Posted May 1, 2010 Share Posted May 1, 2010 Although, I still do have to copy over the dll's for engine, newton and jointlibrary.No you don't. See the "Shared LE Setup" on Wiki front page. 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...
Shard Posted May 6, 2010 Author Share Posted May 6, 2010 Turns out that it that it didn't actually work. When I compile every is fine, but when it goes to link, everything goes to hell. I have several messages like this: 1>------ Build started: Project: MyGame, Configuration: Debug Win32 ------ 1>Linking... 1>Main.obj : error LNK2019: unresolved external symbol "void __cdecl Flip(int)" (?Flip@@YAXH@Z) referenced in function _WinMain@16 1>Main.obj : error LNK2019: unresolved external symbol "void __cdecl SetBlend(int)" (?SetBlend@@YAXH@Z) referenced in function _WinMain@16 1>Main.obj : error LNK2019: unresolved external symbol "int __cdecl AppSuspended(void)" (?AppSuspended@@YAHXZ) referenced in function _WinMain@16 1>Main.obj : error LNK2019: unresolved external symbol "int __cdecl KeyHit(int)" (?KeyHit@@YAHH@Z) referenced in function _WinMain@16 1>Controls.obj : error LNK2001: unresolved external symbol "int __cdecl KeyHit(int)" (?KeyHit@@YAHH@Z) 1>KeyMouse.obj : error LNK2001: unresolved external symbol "int __cdecl KeyHit(int)" (?KeyHit@@YAHH@Z) 1>Main.obj : error LNK2019: unresolved external symbol "int __cdecl Terminate(void)" (?Terminate@@YAHXZ) referenced in function "public: int __thiscall LEO::Engine::Free(void)" (?Free@Engine@LEO@@QAEHXZ) 1>Main.obj : error LNK2001: unresolved external symbol "private: static int LEO::Engine::instances" (?instances@Engine@LEO@@0HA) 1>Main.obj : error LNK2001: unresolved external symbol "bool LEO::g_engineLoaded" (?g_engineLoaded@LEO@@3_NA) 1>Main.obj : error LNK2019: unresolved external symbol "public: void __thiscall leadwerks::Framewerk::SetStats(int)" (?SetStats@Framewerk@leadwerks@@QAEXH@Z) referenced in function "void __cdecl SetPointers(void)" (?SetPointers@@YAXXZ) 1>Main.obj : error LNK2019: unresolved external symbol "int __cdecl Graphics(int,int,int,int,int)" (?Graphics@@YAHHHHHH@Z) referenced in function "public: void __thiscall LEO::Engine::InitGraphics(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,int,int,int,int)" (?InitGraphics@Engine@LEO@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HHHHH@Z) 1>Main.obj : error LNK2019: unresolved external symbol "void __cdecl SetAppTitle(char *)" (?SetAppTitle@@YAXPAD@Z) referenced in function "public: void __thiscall LEO::Engine::InitGraphics(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,int,int,int,int)" (?InitGraphics@Engine@LEO@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HHHHH@Z) 1>Main.obj : error LNK2019: unresolved external symbol "int __cdecl Initialize(int)" (?Initialize@@YAHH@Z) referenced in function "private: bool __thiscall LEO::Engine::LoadFunctions(int)" (?LoadFunctions@Engine@LEO@@AAE_NH@Z) 1>Main.obj : error LNK2019: unresolved external symbol "public: __thiscall leadwerks::Framewerk::Framewerk(void)" (??0Framewerk@leadwerks@@QAE@XZ) referenced in function "void __cdecl `dynamic initializer for 'frameWerk''(void)" (??__EframeWerk@@YAXXZ) 1>Controls.obj : error LNK2019: unresolved external symbol "public: unsigned char * __thiscall leadwerks::Layer::GetCamera(void)" (?GetCamera@Layer@leadwerks@@QAEPAEXZ) referenced in function "public: void __thiscall Controls::UpdatePlayerControls(void)" (?UpdatePlayerControls@Controls@@QAEXXZ) 1>Player.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall leadwerks::Layer::GetCamera(void)" (?GetCamera@Layer@leadwerks@@QAEPAEXZ) Attached are the pictures of how I linked the files. Can anyone tell me what I did wrong? Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
Canardia Posted May 6, 2010 Share Posted May 6, 2010 You didn't add the cpp files to your project (where main.cpp also is). 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...
Shard Posted May 6, 2010 Author Share Posted May 6, 2010 You didn't add the cpp files to your project (where main.cpp also is). I just added it to the project via the Solution Explorer which worked. This would be the best way right? So that when I update, all the files are auto updated and I don't have to move them. Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
Canardia Posted May 6, 2010 Share Posted May 6, 2010 The files are on disk, you only see links to them in the 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...
Shard Posted May 7, 2010 Author Share Posted May 7, 2010 The files are on disk, you only see links to them in the project. Sweet thanks. Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK 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.