Linker error when trying to build CEGUI v0.5.0 in VC8

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Gyrofalcon
Just popping in
Just popping in
Posts: 3
Joined: Thu Mar 08, 2007 00:36

Linker error when trying to build CEGUI v0.5.0 in VC8

Postby Gyrofalcon » Sat Mar 24, 2007 18:57

Yeah, the title should explain it all. I'm attempting to build it with OGRE, but that doesn't seem to be where the problem lies. I'm also attempting to build it with the CEGUI-Lua, but I still get the first four errors without it. Here are the .lib files in my linker input:

SDL.lib
lua.lib
OgreOde_Core.lib
OgreOde_Prefab.lib
OgreMain.lib
user32.lib
SDL_ttf.lib
CEGUIBase.lib
OgreGUIRenderer.lib
CEGUILua.lib
tolua++.lib
CEGUIExpatParser.lib

And here is the error:

Code: Select all

1>------ Build started: Configuration: Release Win32 ------
1>Linking...

1>client.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::RefPtr<class CEGUI::Event::ConnectionInterface> __thiscall CEGUI::LuaScriptModule::subscribeEvent(class CEGUI::EventSet *,class CEGUI::String const &,int,class CEGUI::String const &)" (?subscribeEvent@LuaScriptModule@CEGUI@@UAE?AV?$RefPtr@VConnectionInterface@Event@CEGUI@@@2@PAVEventSet@2@ABVString@2@H1@Z)

1>client.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::RefPtr<class CEGUI::Event::ConnectionInterface> __thiscall CEGUI::LuaScriptModule::subscribeEvent(class CEGUI::EventSet *,class CEGUI::String const &,class CEGUI::String const &)" (?subscribeEvent@LuaScriptModule@CEGUI@@UAE?AV?$RefPtr@VConnectionInterface@Event@CEGUI@@@2@PAVEventSet@2@ABVString@2@1@Z)

1>client.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::RefPtr<class CEGUI::Event::ConnectionInterface> __thiscall CEGUI::EventSet::subscribeEvent(class CEGUI::String const &,int,class CEGUI::SubscriberTemplate<bool,class CEGUI::EventArgs const &>)" (?subscribeEvent@EventSet@CEGUI@@UAE?AV?$RefPtr@VConnectionInterface@Event@CEGUI@@@2@ABVString@2@HV?$SubscriberTemplate@_NABVEventArgs@CEGUI@@@2@@Z)

1>client.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::RefPtr<class CEGUI::Event::ConnectionInterface> __thiscall CEGUI::EventSet::subscribeEvent(class CEGUI::String const &,class CEGUI::SubscriberTemplate<bool,class CEGUI::EventArgs const &>)" (?subscribeEvent@EventSet@CEGUI@@UAE?AV?$RefPtr@VConnectionInterface@Event@CEGUI@@@2@ABVString@2@V?$SubscriberTemplate@_NABVEventArgs@CEGUI@@@2@@Z)

1>client.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::RefPtr<class CEGUI::Event::ConnectionInterface> __thiscall CEGUI::EventSet::subscribeScriptedEvent(class CEGUI::String const &,int,class CEGUI::String const &)" (?subscribeScriptedEvent@EventSet@CEGUI@@UAE?AV?$RefPtr@VConnectionInterface@Event@CEGUI@@@2@ABVString@2@H0@Z)

1>client.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::RefPtr<class CEGUI::Event::ConnectionInterface> __thiscall CEGUI::EventSet::subscribeScriptedEvent(class CEGUI::String const &,class CEGUI::String const &)" (?subscribeScriptedEvent@EventSet@CEGUI@@UAE?AV?$RefPtr@VConnectionInterface@Event@CEGUI@@@2@ABVString@2@0@Z)

1>../bin/AGE.exe : fatal error LNK1120: 6 unresolved externals

1>Build log was saved at "BuildLog.htm"

(Log was edited slightly)

And as I said, the first four errors still occur when I remove every file related to CEGUILua from the project.

Can anybody give a helping hand with this?

Gyrofalcon
Just popping in
Just popping in
Posts: 3
Joined: Thu Mar 08, 2007 00:36

Postby Gyrofalcon » Mon Apr 02, 2007 17:22

Please excuse the bump, but I haven't gotten a single response and it's been a couple of weeks since I posted this.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Mon Apr 02, 2007 21:28

Hi,

sorry for the late reply. What is 'client.obj'? That is a file of yourself? Does cegui 0.5 compile and link without that file? I mean can you link the cegui solution which gets created by the batchfile? Can you post some of your 'client' file?

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Tue Apr 03, 2007 15:28

maybe it can be a problem with the 'const'ness of the arguments or so, I had something similar once.

Gyrofalcon
Just popping in
Just popping in
Posts: 3
Joined: Thu Mar 08, 2007 00:36

Postby Gyrofalcon » Tue Apr 03, 2007 19:30

scriptkid wrote:Hi,

sorry for the late reply. What is 'client.obj'? That is a file of yourself? Does cegui 0.5 compile and link without that file? I mean can you link the cegui solution which gets created by the batchfile? Can you post some of your 'client' file?


Client.obj is the compiled code of client.cpp. That is one of my files, yes. This is the code in that file in which I use the methods which seem to be causing the linker errors:

Code: Select all

bool AGE_Application::initMainMenu(lua_State *L)
{
gGUIScriptM = new CEGUI::LuaScriptModule(L);
gSceneMgr = gRoot->createSceneManager(ST_GENERIC);
gCamera = gSceneMgr->createCamera("MenuCam");
Viewport* menuviewport = gWindow->addViewport(gCamera);
menuviewport->setBackgroundColour(ColourValue(0,0,0));
return true;
}


When I remove this code, I still get the first four errors. When I try to build the solution without client.cpp and client.h, the whole thing builds perfectly, but this only makes sense as I don't use any CEGUI code in any of my files (at least at this point) except those.

Also, I'm building my project with CEGUI by including some of the files, adding the include directories, and adding many of the CEGUI .lib files to my linker input.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 21 guests