Setting Up .lib files

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

MoLAoS
Just popping in
Just popping in
Posts: 1
Joined: Fri Apr 06, 2012 20:30

Setting Up .lib files

Postby MoLAoS » Fri Apr 06, 2012 20:37

So I installed the SDK and got everything all set up except I can't use the .lib files. I used vs 2010 express to compile the .dll files for openglrender and ceguibase and falagard and it seems to be fine. However I have no files with the lib extension. When I ran the compiler for each dll file i also got an exports file library and an object library file. But I have no .lib files or anything like a regular library file. When I use nvidia or boost or sfml or any of the other sdks I use I never see anything but .lib/.a/.so and so forth files. I know I am supposed to link to some .lib files, how do I get these files?

If it helps at all these are the errors I have been getting trying to run a cegui project in visual studios:

Code: Select all

1>------ Build started: Project: ceguiwindows, Configuration: Debug Win32 ------
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall CEGUI::Window::setText(class CEGUI::String const &)" (__imp_?setText@Window@CEGUI@@QAEXABVString@2@@Z) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall CEGUI::Window::setSize(class CEGUI::UVector2 const &)" (__imp_?setSize@Window@CEGUI@@QAEXABVUVector2@2@@Z) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CEGUI::UDim::~UDim(void)" (__imp_??1UDim@CEGUI@@QAE@XZ) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CEGUI::UVector2::~UVector2(void)" (__imp_??1UVector2@CEGUI@@QAE@XZ) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall CEGUI::Window::setPosition(class CEGUI::UVector2 const &)" (__imp_?setPosition@Window@CEGUI@@QAEXABVUVector2@2@@Z) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CEGUI::UVector2::UVector2(class CEGUI::UDim const &,class CEGUI::UDim const &)" (__imp_??0UVector2@CEGUI@@QAE@ABVUDim@1@0@Z) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CEGUI::UDim::UDim(float,float)" (__imp_??0UDim@CEGUI@@QAE@MM@Z) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall CEGUI::Window::addChildWindow(class CEGUI::Window *)" (__imp_?addChildWindow@Window@CEGUI@@QAEXPAV12@@Z) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class CEGUI::Window * __thiscall CEGUI::System::setGUISheet(class CEGUI::Window *)" (__imp_?setGUISheet@System@CEGUI@@QAEPAVWindow@2@PAV32@@Z) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class CEGUI::System & __cdecl CEGUI::System::getSingleton(void)" (__imp_?getSingleton@System@CEGUI@@SAAAV12@XZ) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CEGUI::String::~String(void)" (__imp_??1String@CEGUI@@QAE@XZ) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class CEGUI::Window * __thiscall CEGUI::WindowManager::createWindow(class CEGUI::String const &,class CEGUI::String const &)" (__imp_?createWindow@WindowManager@CEGUI@@QAEPAVWindow@2@ABVString@2@0@Z) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CEGUI::String::String(char const *)" (__imp_??0String@CEGUI@@QAE@PBD@Z) referenced in function _wmain
1>ceguiwindows.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class CEGUI::WindowManager & __cdecl CEGUI::Singleton<class CEGUI::WindowManager>::getSingleton(void)" (__imp_?getSingleton@?$Singleton@VWindowManager@CEGUI@@@CEGUI@@SAAAVWindowManager@2@XZ) referenced in function _wmain
1>C:\Users\Matt\Documents\Visual Studio 2010\Projects\ceguiwindows\Debug\ceguiwindows.exe : fatal error LNK1120: 14 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


EDIT by Kulik: code tags :x

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Setting Up .lib files

Postby Kulik » Sat Apr 07, 2012 09:43

You should get import library files (.lib) and DLLs. Link to the import files.

I think you are looking in the wrong folder or something. The bin folder will contain dlls and exes, the lib will contain import library files.

Worstkaasscenario
Just popping in
Just popping in
Posts: 2
Joined: Wed Apr 11, 2012 23:06

Re: Setting Up .lib files

Postby Worstkaasscenario » Wed Apr 11, 2012 23:14

Hi, I'm new here and I'm getting the same linker errors. I tried adding any folder containing lib and dll files to the additional library directories, and when even this didn't work, I tried copying the lib and dll files to the debug folder. Still no luck.
I'm going through the tutorial and trying to get the most basic window to appear, but it seems like every single line of code is producing a linker error. Is there something I forgot to do? Like define something perhaps, because I notice that all the errors are declspec(dllimport) related.
Thanks in advance,
wks

EDIT: I found the solution for the linker errors in my program at least: in 'Project Properties > Configuration properties > Linker > input > additional dependencies' add ceguibase.lib and ceguiopenglrenderer.lib or the one you're using.
Unfortunately, now it's complaining about not being able to find CEGUIOpenGLRenderer_d.dll :(
EDIT II: I had changed an option in config.lua in the premake folder to get rid of the _d. Changing this back and rebuilding the CEGUIOpenGLRenderer project fixed this. Though I did need to copy the files to the debug folder.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 9 guests