Author Topic: 3.2.2 linking errors  (Read 11566 times)

ebola

  • Guest
3.2.2 linking errors
« on: 5 April 2009, 02:11:48 »
I got some linking errors due to the Lua library, no idea why.

Code: [Select]
Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
Copyright (C) Microsoft Corporation.  All rights reserved.
Linking...
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
MSVCRT.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
libglest.lib(platform_util.obj) : error LNK2019: unresolved external symbol _MiniDumpWriteDump@28 referenced in function "private: static long __stdcall Shared::Platform::PlatformExceptionHandler::handler(struct _EXCEPTION_POINTERS *)" (?handler@PlatformExceptionHandler@Platform@Shared@@CGJPAU_EXCEPTION_POINTERS@@@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _luaL_openlibs referenced in function "public: __thiscall Shared::Lua::LuaScript::LuaScript(void)" (??0LuaScript@Lua@Shared@@QAE@XZ)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _luaL_newstate referenced in function "public: __thiscall Shared::Lua::LuaScript::LuaScript(void)" (??0LuaScript@Lua@Shared@@QAE@XZ)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_close referenced in function "public: __thiscall Shared::Lua::LuaScript::~LuaScript(void)" (??1LuaScript@Lua@Shared@@QAE@XZ)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_pcall referenced in function "public: void __thiscall Shared::Lua::LuaScript::loadCode(class std::basic_string,class std::allocator > const &,class std::basic_string,class std::allocator > const &)" (?loadCode@LuaScript@Lua@Shared@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _luaL_loadbuffer referenced in function "public: void __thiscall Shared::Lua::LuaScript::loadCode(class std::basic_string,class std::allocator > const &,class std::basic_string,class std::allocator > const &)" (?loadCode@LuaScript@Lua@Shared@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_getfield referenced in function "public: void __thiscall Shared::Lua::LuaScript::beginCall(class std::basic_string,class std::allocator > const &)" (?beginCall@LuaScript@Lua@Shared@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_setfield referenced in function "public: void __thiscall Shared::Lua::LuaScript::registerFunction(int (__cdecl*)(struct lua_State *),class std::basic_string,class std::allocator > const &)" (?registerFunction@LuaScript@Lua@Shared@@QAEXP6AHPAUlua_State@@@ZABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_pushcclosure referenced in function "public: void __thiscall Shared::Lua::LuaScript::registerFunction(int (__cdecl*)(struct lua_State *),class std::basic_string,class std::allocator > const &)" (?registerFunction@LuaScript@Lua@Shared@@QAEXP6AHPAUlua_State@@@ZABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _luaL_checklstring referenced in function "private: class std::basic_string,class std::allocator > __thiscall Shared::Lua::LuaScript::errorToString(int)" (?errorToString@LuaScript@Lua@Shared@@AAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _luaL_checkinteger referenced in function "public: int __thiscall Shared::Lua::LuaArguments::getInt(int)const " (?getInt@LuaArguments@Lua@Shared@@QBEHH@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_isnumber referenced in function "public: int __thiscall Shared::Lua::LuaArguments::getInt(int)const " (?getInt@LuaArguments@Lua@Shared@@QBEHH@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_isstring referenced in function "public: class std::basic_string,class std::allocator > __thiscall Shared::Lua::LuaArguments::getString(int)const " (?getString@LuaArguments@Lua@Shared@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_settop referenced in function "public: class Shared::Graphics::Vec2 __thiscall Shared::Lua::LuaArguments::getVec2i(int)const " (?getVec2i@LuaArguments@Lua@Shared@@QBE?AV?$Vec2@H@Graphics@3@H@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_rawgeti referenced in function "public: class Shared::Graphics::Vec2 __thiscall Shared::Lua::LuaArguments::getVec2i(int)const " (?getVec2i@LuaArguments@Lua@Shared@@QBE?AV?$Vec2@H@Graphics@3@H@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_objlen referenced in function "public: class Shared::Graphics::Vec2 __thiscall Shared::Lua::LuaArguments::getVec2i(int)const " (?getVec2i@LuaArguments@Lua@Shared@@QBE?AV?$Vec2@H@Graphics@3@H@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_type referenced in function "public: class Shared::Graphics::Vec2 __thiscall Shared::Lua::LuaArguments::getVec2i(int)const " (?getVec2i@LuaArguments@Lua@Shared@@QBE?AV?$Vec2@H@Graphics@3@H@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_pushinteger referenced in function "public: void __thiscall Shared::Lua::LuaArguments::returnInt(int)" (?returnInt@LuaArguments@Lua@Shared@@QAEXH@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_pushstring referenced in function "public: void __thiscall Shared::Lua::LuaArguments::returnString(class std::basic_string,class std::allocator > const &)" (?returnString@LuaArguments@Lua@Shared@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_rawseti referenced in function "public: void __thiscall Shared::Lua::LuaArguments::returnVec2i(class Shared::Graphics::Vec2 const &)" (?returnVec2i@LuaArguments@Lua@Shared@@QAEXABV?$Vec2@H@Graphics@3@@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_pushnumber referenced in function "public: void __thiscall Shared::Lua::LuaArguments::returnVec2i(class Shared::Graphics::Vec2 const &)" (?returnVec2i@LuaArguments@Lua@Shared@@QAEXABV?$Vec2@H@Graphics@3@@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_createtable referenced in function "public: void __thiscall Shared::Lua::LuaArguments::returnVec2i(class Shared::Graphics::Vec2 const &)" (?returnVec2i@LuaArguments@Lua@Shared@@QAEXABV?$Vec2@H@Graphics@3@@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _luaL_checknumber referenced in function "private: void __thiscall Shared::Lua::LuaArguments::throwLuaError(class std::basic_string,class std::allocator > const &)const " (?throwLuaError@LuaArguments@Lua@Shared@@ABEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
libglest.lib(lua_script.obj) : error LNK2019: unresolved external symbol _lua_gettop referenced in function "private: void __thiscall Shared::Lua::LuaArguments::throwLuaError(class std::basic_string,class std::allocator > const &)const " (?throwLuaError@LuaArguments@Lua@Shared@@ABEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
Release\game.exe : fatal error LNK1120: 25 unresolved externals

And hello, I'm new around here. I've been looking for some well established RTS engines to mess around with. I narrowed down to Glest, TA Spring, and ORTS, and Glest's stability and extensbility did it for me. I'm actually looking to customize the Glest engine and build an entire game off of it. I'll post more about that once I get Glest all set up and actually familiarize myself with the code.

EDIT:
ok, I fixed the Lua errors, but I'm still getting a couple

Code: [Select]
Error 108 error LNK2019: unresolved external symbol _MiniDumpWriteDump@28 referenced in function "private: static long __stdcall Shared::Platform::PlatformExceptionHandler::handler(struct _EXCEPTION_POINTERS *)" (?handler@PlatformExceptionHandler@Platform@Shared@@CGJPAU_EXCEPTION_POINTERS@@@Z) libglest.lib game
Error 109 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup MSVCRT.lib game
Error 110 fatal error LNK1120: 2 unresolved externals Release\game.exe game

this is killing me, cus I can compile GAE w/ no problems, but normal glest is just giving me these errors

EDIT2:
Got rid of 1 more error, I compiled using the windows subsystem instead of the console subsystem, for which I feel stupid. The only one I got left is this one
Code: [Select]
2>libglest.lib(platform_util.obj) : error LNK2001: unresolved external symbol _MiniDumpWriteDump@28if anyone can help, now would be good =p
« Last Edit: 5 April 2009, 21:44:58 by ebola »

ebola

  • Guest
Re: 3.2.2 linking errors
« Reply #1 on: 5 April 2009, 22:04:22 »
Okay, I figured it out. 3.2.2 had a dbghelp dependency (was this added after 3.2+?). Thanks for all the help guys.

EDIT:
Yeah, I checked the previous source code, they added the dbghelp dependency after 3.2. grrr, there should be a list of dependencies somewhere. i didn't enjoy tracking all of them down.

*also, does anyone know why Glest didn't statically link the xml parser when they statically linked everything else?
« Last Edit: 5 April 2009, 22:28:36 by ebola »

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: 3.2.2 linking errors
« Reply #2 on: 6 April 2009, 01:58:55 »
Quote
*also, does anyone know why Glest didn't statically link the xml parser when they statically linked everything else?
Possibly because of its size.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

terren

  • Guest
Re: 3.2.2 linking errors
« Reply #3 on: 18 May 2009, 12:52:54 »
Hello,ebola.

It looks like you were using Visual C++ compiler family.
With your posted compiler error msg,I guess the compiler
would not compile with DBGHELP.lib(MiniDumpWriteDump)

and entry function is not WinMain,but glestMain,you can
specify entry function in Visual C++ compiler.

regards,
                                            terren

me5

  • Guest
Re: 3.2.2 linking errors
« Reply #4 on: 20 October 2009, 18:00:43 »
ebola can you please tell me how you fixed the Lua errors?

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: 3.2.2 linking errors
« Reply #5 on: 20 October 2009, 18:04:45 »
I'm sorry to tell you this but Ebola hasn't been on since May 8th.
Egypt Remastered!

Proof: Owner of glest@mail.com

me5

  • Guest
Re: 3.2.2 linking errors
« Reply #6 on: 21 October 2009, 15:39:59 »
Thanks -Archmage-.
Have someone else had this errors and managed to fix them?

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: 3.2.2 linking errors
« Reply #7 on: 21 October 2009, 16:04:16 »
I don't know.
Try searching the boards.
Egypt Remastered!

Proof: Owner of glest@mail.com

me5

  • Guest
Re: 3.2.2 linking errors
« Reply #8 on: 22 October 2009, 07:02:58 »
Already done whith no success.

me5

  • Guest
Re: 3.2.2 linking errors
« Reply #9 on: 23 October 2009, 16:41:48 »
OK I included the lua library and the lua errors are gone.
What about the dbghelp dependency?

terren told:
Quote
I guess the compiler would not compile with DBGHELP.lib(MiniDumpWriteDump)

I included dbghelp.lib and got alot of warnings but no errors.
I replaced the original glest.exe file with the one I compiled but glest doesn't start.
What I get is this:


Have I also to replace other files?
My exe file is about 3.2 MB but the original is about 1.1MB.

fkerber

  • Guest
Re: 3.2.2 linking errors
« Reply #10 on: 4 January 2010, 23:49:42 »
Hey,

After 2 days of trying to compile I got exactly as far as me5 came.
Is there any solution for this exception or at least the reason, why it comes up? I compiled the unchanged sources from the website in Microsoft Visual C++ 2008 Express Edition on Windows XP.

Edit:
https://forum.megaglest.org/index.php?topic=4670.0
Here is said, that s.th. wrong with the project settings - but unfortuanetly not what. I could fix the error for this specific situation - but the next one is coming up - so there must be something wrong...

Thanks in advance,
fkerber
« Last Edit: 5 January 2010, 00:18:08 by fkerber »

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: 3.2.2 linking errors
« Reply #11 on: 5 January 2010, 00:24:25 »
Why are you guys trying to compile just use the official one.
Egypt Remastered!

Proof: Owner of glest@mail.com

fkerber

  • Guest
Re: 3.2.2 linking errors
« Reply #12 on: 5 January 2010, 00:44:16 »
Because I want to change some things especially add some things.
I thought, an open source game is made openSource for such reasons, isn't it?

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: 3.2.2 linking errors
« Reply #13 on: 5 January 2010, 01:49:11 »
Try compile GAE and I will help [if you have trouble compiling].

There's an experimental CMake in Trunk ( http://sourceforge.net/apps/trac/glestae/wiki/CompileGuide ) and for branches https://docs.megaglest.org/GAE/Compiling

Edit: added clarification.
« Last Edit: 18 June 2016, 13:42:24 by filux »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

fkerber

  • Guest
Re: 3.2.2 linking errors
« Reply #14 on: 5 January 2010, 07:27:28 »
Hey,

Thank you very much!
I could compile with success and play a bit with the new exe!
Now, I dive into the source code ;)

Bye,
fkerber

obsenty09

  • Guest
3 2 2 linking errors
« Reply #15 on: 6 January 2010, 06:36:58 »
im getting a error : "There were linking errors See the Output window for details." and in the output window it says "Errors :1"

i have no idea what this means.....it does it regardless of wheather i have a serial cable plugged in or not....if i could get some help it would be greatly appreciated