Is anyone *really* statically linking to CEGUI?

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

Stefan Lundmark
Just popping in
Just popping in
Posts: 16
Joined: Wed Oct 14, 2009 22:11

Is anyone *really* statically linking to CEGUI?

Postby Stefan Lundmark » Wed Oct 28, 2009 22:44

Hi,

I keep running into issues with static linking. For one, my package (MSVC 2008) simply won't link (unresolved externals) to the static libs when CEGUIEXPORT is set to either import or export, so I end up with this:

Code: Select all

//#if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
//#   ifdef CEGUIBASE_EXPORTS
//#       define CEGUIEXPORT __declspec(dllexport)
//#   else
//#       define CEGUIEXPORT __declspec(dllimport)
//#   endif
//#       define CEGUIPRIVATE
//#else
#       define CEGUIEXPORT
#       define CEGUIPRIVATE
//#endif


CEGUI_STATIC is defined and I haven't touched anything after the premake made the solution/project files for me.
Just thought I'd mention it.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Is anyone *really* statically linking to CEGUI?

Postby Jamarr » Thu Oct 29, 2009 17:23

Sure, lots of people are statically-linking CEGUI. I am one of them.

In regards to your issue, you did not specify the version of CEGUI you are compiling? You also did not specify the library files your project is trying to link against? Also, did you have any success getting the samples to run?
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

Stefan Lundmark
Just popping in
Just popping in
Posts: 16
Joined: Wed Oct 14, 2009 22:11

Re: Is anyone *really* statically linking to CEGUI?

Postby Stefan Lundmark » Thu Oct 29, 2009 22:13

CEGUI version 0.7.1 but I'm pretty sure I had to do the same change for 0.6x.

I haven't tried the samples (did a fresh new project in MSVC but it failed with the same linker errors) as it's working now with the changes I described in my first post. Just wanted to write it down incase someone else runs into the same issue, and see if anyone is statically linking. :)

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:

Re: Is anyone *really* statically linking to CEGUI?

Postby scriptkid » Tue Nov 03, 2009 19:41

Hi,

'We' as in 'team' are statically linking and testing with the samples, before we ship our code and SDK's.

Can you post your VC build log some time? That could give us some insight. It almost looks like you are accidently linking a non-static file with your app. Or maybe not at all :)

Thanks.
Check out my released snake game using Cegui!

Stefan Lundmark
Just popping in
Just popping in
Posts: 16
Joined: Wed Oct 14, 2009 22:11

Re: Is anyone *really* statically linking to CEGUI?

Postby Stefan Lundmark » Tue Nov 03, 2009 19:53

Hi scriptkid,

I'm obviously linking to the correct lib since between changing those lines and recompiling CEGUI, there's nothing else I've done and it works just fine after the commenting out those defines. I have to admit I haven't tried the samples though. I'm considering switching back to 0.6 and I'll post the build log when I do that as the "error" surely will come up again.


Return to “Help”

Who is online

Users browsing this forum: Google [Bot] and 18 guests