Cannot find CEGUIOgreRenderer.lib [SOLVED]

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

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: What the heck am I doing wrong?!

Postby Ident » Wed May 08, 2013 15:55

we need the video.
CrazyEddie: "I don't like GUIs"

Aspirer
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Fri Dec 21, 2012 07:33

Re: What the heck am I doing wrong?!

Postby Aspirer » Wed May 08, 2013 20:44

http://www.youtube.com/watch?v=Ipo5Nm9P ... e=youtu.be

I hope the quality is good enough. Foreword: I deleted the premake folder within cegui for the video so the project files could be built and config.lua would be pristine after I copied that folder from the cegui download. So they were already in place before the video started. I even included build errors (paused the video to save time) for all three things that I described in my last post.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: What the heck am I doing wrong?!

Postby CrazyEddie » Wed May 08, 2013 21:57

Before I come to the error, why are you editing the CEGUIBase project properties? Where in the demonstration video do you see us show that? Where in my summary of the steps required does it say to do that?

The premake script that generates the CEGUIBase project is this:

Code: Select all

--
-- CEGUIBase premake script
--

cegui_dynamic("CEGUIBase")

package.files =
{
    matchfiles(rootdir.."cegui/src/*.cpp"),
    matchfiles(rootdir.."cegui/include/*.h"),
    matchfiles(rootdir.."cegui/src/elements/*.cpp"),
    matchfiles(rootdir.."cegui/include/elements/*.h"),
    matchfiles(rootdir.."cegui/src/falagard/*.cpp"),
    matchfiles(rootdir.."cegui/include/falagard/*.h"),
}

-- we do not want to build this directly; it's included elsewhere when needed.
package.excludes =
{
    rootdir.."cegui/src/minibidi.cpp",
}

if not CEGUI_USE_DEFAULT_LOGGER then
    tinsert(package.excludes, rootdir.."cegui/src/CEGUIDefaultLogger.cpp")
end

if not CEGUI_USE_FREETYPE then
    tinsert(package.excludes, rootdir.."cegui/src/CEGUIFreeTypeFont.cpp")
else
    library("freetype","_D")
end

if not CEGUI_USE_PCRE_REGEX then
    tinsert(package.excludes, rootdir.."cegui/src/CEGUIPCRERegexMatcher.cpp")
else
    library("pcre", "_d")
    define("PCRE_STATIC")
end

if not CEGUI_BIDI_SUPPORT then
    tinsert(package.excludes, rootdir.."cegui/src/CEGUIFribidiVisualMapping.cpp")
    tinsert(package.excludes, rootdir.."cegui/src/CEGUIMinibidiVisualMapping.cpp")
else
    if CEGUI_USE_MINIBIDI then
        tinsert(package.excludes, rootdir.."cegui/src/CEGUIFribidiVisualMapping.cpp")
    else
        tinsert(package.excludes, rootdir.."cegui/src/CEGUIMinibidiVisualMapping.cpp")
    end
end

if not MINIZIP_RESOURCE_PROVIDER then
    tinsert(package.excludes, rootdir.."cegui/src/CEGUIMinizipResourceProvider.cpp")
    tinsert(package.excludes, rootdir.."cegui/include/CEGUIMinizipResourceProvider.h")
else
    tinsert(package.files, matchfiles(rootdir.."cegui/src/minizip/*.cpp"))
    tinsert(package.files, matchfiles(rootdir.."cegui/src/minizip/*.h"))
    library("zlib", "_d")
end

library("Winmm", "")

define("CEGUIBASE_EXPORTS")


As you can see, there is no mention of CEGUIOgreRenderer here. Please go to the Linker properties in CEGUIBase project and look at the list of libraries that it's linking to - the one that contains things like pcre_d and freetype_D. Is CEGUIOgreRenderer_d in that list? If it's in that list, you have added it or caused it to be added, because if the project generation was putting it there, there would be some mention of it in the above file. If CEGUIOgreRenderer_d is not in the list of libraries in the project Linker settings, then is has either been added to some global MSVC++ property sheet such that it gets added to every project or some CEGUI source or header file has been edited have a #pragma comment(lib, CEGUIOgreRenderer_d) or similar line that is bringing it in.

CE

Aspirer
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Fri Dec 21, 2012 07:33

Re: What the heck am I doing wrong?!

Postby Aspirer » Wed May 08, 2013 23:06

Omg I think that's it Eddie! I did create a property sheet for my other projects so it would be easier to build them. I didn't know that property sheet would become global. Now the question is how do I get it off of being global and prevent it from happening in the future? I honestly had no idea that the property sheet would do that. The property manager tends to hide itself at the bottom of the screen and if you don't know its open you don't think to look for it. I think this may be the problem because I've opened up the property manager and the filename is the same as some of my ogre projects.

timotei
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Mon Apr 29, 2013 14:17

Re: What the heck am I doing wrong?!

Postby timotei » Thu May 09, 2013 06:31

Really? Did you just mess with GLOBAL settings instead of per-project basis ones? That's bad you know, unless you know 100% percent what are you doing :P. I suggest you read this: http://msdn.microsoft.com/en-us/library ... 80%29.aspx Property sheets ARE global, since they are included in every single project. It's the same as the VS2008 where you set the global VC/VC++ directories and so on.

To answer you question: just set the properties on a per-project basis. It seems it's more to work, but that's the correct way of doing it, and there's no workaround for this. If the project files you use are generated from somewhere, then configure the generator with the required settings so they will reflect themselves in the project properties in VS :)

Also:
- To show that annoying property manager: http://stackoverflow.com/questions/1017 ... ss-version
- To restore your current configuration and property sheets: http://stackoverflow.com/questions/9248 ... ault-value

User avatar
Nickenstein79
Quite a regular
Quite a regular
Posts: 93
Joined: Thu May 09, 2013 06:19

Re: What the heck am I doing wrong?!

Postby Nickenstein79 » Thu May 09, 2013 06:32

I'm having a build issue too. (Using Ogre 1_8_1, CEGUI-0.7.9, and latest dependencies).

I am trying to build the static libs (release and debug static). I can get CEGUI to build just fine in both release and debug for static libs, but when I add the libs to my game, and try to instantiate CEGUI, I get a bunch of link errors.

Using the following snippet to try and bootstrap CEGUI:

This in my precompiled header:

Code: Select all

#include "CEGUI.h"
#include "RendererModules\Ogre\CEGUIOgreRenderer.h"


and this in my BaseApplication.cpp:

Code: Select all

CEGUI::OgreRenderer& myRenderer =
CEGUI::OgreRenderer::create();

CEGUI::System::create( myRenderer );


But when building my game I get 26 linker errors, mostly relating to msvcprtd.lib.

So my question is this: Should I even be using the Static lib builds of CEGUI or just stick with DLL builds? (I'd rather use .libs if I can, but if those builds are broke I could use DLL, just would rather not. I hate the concept of distributing my game with a bunch of random DLLs when everything could have been linked directly into the exe.)

Cheers,
Nick
Last edited by Nickenstein79 on Thu May 09, 2013 06:43, edited 1 time in total.

timotei
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Mon Apr 29, 2013 14:17

Re: What the heck am I doing wrong?!

Postby timotei » Thu May 09, 2013 06:43

Please open a new thread with your issue, as it's a different one.

First, if you get errors related to msvcprtd.lib, then you've tampered with the default MSVC settings. If I remember correctly there is a flag that modifies that (http://support.microsoft.com/kb/154753). I recommend you re-create the project file and don't modify anything that you don't understand.

Second: NO static linking. The .lib is not always used only by static linking, but on dynamic linking too. So go with dynamic, even if it requires the .dll alongside.

User avatar
Nickenstein79
Quite a regular
Quite a regular
Posts: 93
Joined: Thu May 09, 2013 06:19

Re: What the heck am I doing wrong?!

Postby Nickenstein79 » Thu May 09, 2013 06:46

Thanks for the reply, TImotei. Wow you have silky smooth hair!

No need to open a new thread. I just wanted confirmation on whether I should be using the static or DLL builds.

I have my answer. (Bluuurggg, I hate DLLs) ;)


EDIT - It might be useful if the HowTo instructional I followed informed people to avoid using the static lib builds, as I personally leapt right on that build option when I saw it, owing to my utter disdain and absolute contempt of DLLs. ;)
(Or maybe even putting out a new version of the CEGUI prebuildMSVC2008 solution that doesn't have those build options.)

Aspirer
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Fri Dec 21, 2012 07:33

Re: What the heck am I doing wrong?!

Postby Aspirer » Thu May 09, 2013 22:41

Thanks timotei. I changed those settings because someone on the ogre forums suggested it. Its true I didn't know what I was doing xD

EDIT: I got it to build! Solution: change my global property page by deleting wrong paths and adding the correct ones, while also deleting any additional dependencies from the Linker->Input->Additional Dependencies setting.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 11 guests