[SOLVED] LNK2019, VS8.0

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

Pencheff
Just popping in
Just popping in
Posts: 5
Joined: Fri Aug 29, 2008 11:34

[SOLVED] LNK2019, VS8.0

Postby Pencheff » Thu Jan 22, 2009 10:45

Hi,

It's first time I'm trying to use CEGUI. Some words for my application: my engine is built as library that is statically linked to the main application, the library is linked to all the CEGUI libraries (static_d versions).

Everything compiles successfully, until I had to use the code to initialize with the resources:

Code: Select all

      // set the default resource groups to be used
      CEGUI::Imageset::setDefaultResourceGroup("imagesets");
      CEGUI::Font::setDefaultResourceGroup("fonts");
      CEGUI::Scheme::setDefaultResourceGroup("schemes");
      CEGUI::WidgetLookManager::setDefaultResourceGroup("looknfeels");
      CEGUI::WindowManager::setDefaultResourceGroup("layouts");
      CEGUI::ScriptModule::setDefaultResourceGroup("lua_scripts");


I get LNK2019 in my engine library with all those 6 functions, which I found declared as static in the headers of CEGUI. I cannot understand why after those functions are static, I get this:

Code: Select all

Error   74   error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl CEGUI::ScriptModule::setDefaultResourceGroup(class CEGUI::String const &)" (__imp_?setDefaultResourceGroup@ScriptModule@CEGUI@@SAXABVString@2@@Z) referenced in function "public: long __thiscall MySystem::Initialize(void)" (?Initialize@MySystem@@QAEJXZ)   


Any help will be much appreciated :)


EDIT: My bad, I forgot to put preprocessor "CEGUI_STATIC" :) Everything works fine now :)

Return to “Help”

Who is online

Users browsing this forum: No registered users and 5 guests