cegui-0.8.4 - Static Build on MINGW?

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

tomadom
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 05, 2014 13:08

cegui-0.8.4 - Static Build on MINGW?

Postby tomadom » Mon Dec 08, 2014 03:14

I know there's been some discussion on this in the past but my problem seems to fall outside this.
Building the dependencies has worked fine. I get both the static and dynamic libraries.

When building Cegui itself I can build it error free when building dynamic libraries. But when building static libraries I run into problems.

I am using MinGW 4.8.1 in Windows XP (Win32).

When creating a makefile with cmake I first amended the CmakeLists.txt file so that the following line reads this.
This is on line 128. I amended the option to TRUE.

Code: Select all

option( CEGUI_BUILD_STATIC_CONFIGURATION "Specifies whether the static configs will be built.  (NB: Shared configs are always built)" [b]TRUE[/b])


The majority of the build goes well. I get to 82% built (where both static and dynamic libraries are built) and the following error occurs. Seems to have something to do with lua.

I'm not sure how to go about fixing this. Any clues? Thanks

Code: Select all

[ 82%] Building C object cegui/src/ScriptModules/Lua/support/tolua++bin/CMakeFiles/toluappcegui-0.8_Static.dir/tolua.c.obj
Linking C executable ..\..\..\..\..\..\bin\toluappcegui-0.8_Static.exe
CMakeFiles\toluappcegui-0.8_Static.dir/objects.a(toluabind.c.obj):toluabind.c:(.text+0xf): undefined reference to `_imp__tolua_open'
CMakeFiles\toluappcegui-0.8_Static.dir/objects.a(toluabind.c.obj):toluabind.c:(.text+0x28): undefined reference to `_imp__tolua_module'
CMakeFiles\toluappcegui-0.8_Static.dir/objects.a(toluabind.c.obj):toluabind.c:(.text+0x39): undefined reference to `_imp__tolua_beginmodule'
CMakeFiles\toluappcegui-0.8_Static.dir/objects.a(toluabind.c.obj):toluabind.c:(.text+0x47): undefined reference to `_imp__tolua_dobuffer'
CMakeFiles\toluappcegui-0.8_Static.dir/objects.a(toluabind.c.obj):toluabind.c:(.text+0x4aa): undefined reference to `_imp__tolua_endmodule'
collect2.exe: error: ld returned 1 exit status
cegui\src\ScriptModules\Lua\support\tolua++bin\CMakeFiles\toluappcegui-0.8_Static.dir\build.make:117: recipe for target 'bin/toluappcegui-0.8_Static.exe' failed
mingw32-make[2]: *** [bin/toluappcegui-0.8_Static.exe] Error 1
CMakeFiles\Makefile2:717: recipe for target 'cegui/src/ScriptModules/Lua/support/tolua++bin/CMakeFiles/toluappcegui-0.8_Static.dir/all' failed
mingw32-make[1]: *** [cegui/src/ScriptModules/Lua/support/tolua++bin/CMakeFiles/toluappcegui-0.8_Static.dir/all] Error 2
Makefile:125: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

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

Re: cegui-0.8.4 - Static Build?

Postby Ident » Mon Dec 08, 2014 23:28

Can you check the CEGUIBase project settings to see if the Tolua library is linked at all?
CrazyEddie: "I don't like GUIs"

tomadom
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 05, 2014 13:08

Re: cegui-0.8.4 - Static Build?

Postby tomadom » Tue Dec 09, 2014 14:13

I'm not sure where to check this. What is the CEGUIBase project settings?

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

Re: cegui-0.8.4 - Static Build?

Postby Ident » Tue Dec 09, 2014 14:29

Sorry I do not know anything about MingW. But do you use an IDE? You must be setting somewhere in your IDE what libraries your executable links to, right? That's the settings I meant. And the settings are specific to what would later be the CEGUIBase lib/dll. That is basically what I tried to say using Windows/VisualStudio terms
CrazyEddie: "I don't like GUIs"

tomadom
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 05, 2014 13:08

Re: cegui-0.8.4 - Static Build?

Postby tomadom » Wed Dec 10, 2014 06:56

I do use an IDE but in this case I've used the command line to build cegui and it's dependencies. Dependencies have built fine (with a few changes) but cegui intself runs into all sorts of problems.

I first use cmake to create a makefile using >cmake -G "MinGW Makefiles"
Then I build cegui >mingw32-make -f Makefile

Before all this I placed the include and library path's for the dependencies in my Environmental Variables for cmake under CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH.

Almost all libraries are found but Boost which for some reason isn't seen when Cmake runs. Not sure why.

Before running cmake I go into the CmakeLists.txt and set the below options to TRUE.
CEGUI_BUILD_STATIC_CONFIGURATION
CEGUI_BUILD_SHARED_LIBS_WITH_STATIC_DEPENDENCIES WIN32 OR APPLE

I removed everything and ran the above process again but I now get OpenGL errors at around 65 percent built and would probably get the expat error again if I got past that. They all seem to be linker errors but I'm not sure why.

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

Re: cegui-0.8.4 - Static Build on MINGW?

Postby Ident » Wed Dec 10, 2014 10:52

Well can you look into the makefiles to see if they do the appropriate steps to link the libraries that are supposed to be linked?
CrazyEddie: "I don't like GUIs"

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

Re: cegui-0.8.4 - Static Build on MINGW?

Postby Kulik » Wed Dec 10, 2014 12:13

btw, you are not supposed to change our cmake files. That is not how you change settings with cmake.

Regarding mingw and it's support status, nobody in CEGUI team uses mingw so while it may work the support is limited. We simply don't test it. Please consider providing patches.

tomadom
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 05, 2014 13:08

Re: cegui-0.8.4 - Static Build on MINGW?

Postby tomadom » Wed Dec 10, 2014 12:25

Kulik wrote:btw, you are not supposed to change our cmake files. That is not how you change settings with cmake.

Regarding mingw and it's support status, nobody in CEGUI team uses mingw so while it may work the support is limited. We simply don't test it. Please consider providing patches.



No worries. Thanks anyway.
If I had any idea how to make a patch I would. I wouldn't know where to start.

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

Re: cegui-0.8.4 - Static Build on MINGW?

Postby Ident » Wed Dec 10, 2014 12:27

tomadom wrote:No worries. Thanks anyway.
If I had any idea how to make a patch I would. I wouldn't know where to start.


https://bitbucket.org/cegui/cegui

https://confluence.atlassian.com/displa ... ll+Request


In case you mean that you do not know how to fix the bug: you will have to have some basic knowledge about how MingW links to libraries and how this is configured and where. Then you would need to check what is missing in these configuration files. If you tell us what is missing the next step is to look into the CMake files to see why it was not added.
CrazyEddie: "I don't like GUIs"

tomadom
Just popping in
Just popping in
Posts: 14
Joined: Fri Dec 05, 2014 13:08

Re: cegui-0.8.4 - Static Build on MINGW?

Postby tomadom » Wed Dec 10, 2014 13:28

By the way, Dynamic libs build error free. It's the static libs I'm having problem with.

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

Re: cegui-0.8.4 - Static Build on MINGW?

Postby Ident » Wed Dec 10, 2014 14:32

tomadom wrote:By the way, Dynamic libs build error free. It's the static libs I'm having problem with.

You have already told us that. Dynamic libraries are the better choice anyway btw... Just saying. But having the bug fixed is of course important nevertheless.
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: Bing [Bot] and 14 guests