building cegui in cygwin environment

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
-error
Just popping in
Just popping in
Posts: 1
Joined: Fri Mar 18, 2005 06:04

building cegui in cygwin environment

Postby -error » Fri Mar 18, 2005 06:27

anybody tried this combination? :-)
for me `./configure' went just fine, but compile breaks whith this messages:

Code: Select all

$ make -j2
Making all in .
make[1]: Entering directory `/cygdrive/c/work/cegui_mk2'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/cygdrive/c/work/cegui_mk2'
Making all in src
make[1]: Entering directory `/cygdrive/c/work/cegui_mk2/src'
Making all in .
make[2]: Entering directory `/cygdrive/c/work/cegui_mk2/src'
if /bin/bash ../libtool --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.
./include -I../include -I/usr/include/freetype2      -g -O2 -MT CEGUIFactoryModu
le.lo -MD -MP -MF ".deps/CEGUIFactoryModule.Tpo" -c -o CEGUIFactoryModule.lo CEG
UIFactoryModule.cpp; \
then mv -f ".deps/CEGUIFactoryModule.Tpo" ".deps/CEGUIFactoryModule.Plo"; else r
m -f ".deps/CEGUIFactoryModule.Tpo"; exit 1; fi
if /bin/bash ../libtool --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.
./include -I../include -I/usr/include/freetype2      -g -O2 -MT CEGUIFont_xmlHan
dler.lo -MD -MP -MF ".deps/CEGUIFont_xmlHandler.Tpo" -c -o CEGUIFont_xmlHandler.
lo CEGUIFont_xmlHandler.cpp; \
then mv -f ".deps/CEGUIFont_xmlHandler.Tpo" ".deps/CEGUIFont_xmlHandler.Plo"; el
se rm -f ".deps/CEGUIFont_xmlHandler.Tpo"; exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/usr/include/freetype2
-g -O2 -MT CEGUIFactoryModule.lo -MD -MP -MF .deps/CEGUIFactoryModule.Tpo -c CEG
UIFactoryModule.cpp  -DPIC -o .libs/CEGUIFactoryModule.o
 g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/usr/include/freetype2
-g -O2 -MT CEGUIFont_xmlHandler.lo -MD -MP -MF .deps/CEGUIFont_xmlHandler.Tpo -c
 CEGUIFont_xmlHandler.cpp  -DPIC -o .libs/CEGUIFont_xmlHandler.o
In file included from CEGUIFactoryModule.cpp:29:
../include/CEGUIFactoryModule.h:117: error: 'DYNLIB_HANDLE' is used as a type,
   but is not defined as a type.
CEGUIFactoryModule.cpp: In constructor `
   CEGUI::FactoryModule::FactoryModule(const CEGUI::String&)':
CEGUIFactoryModule.cpp:88: error: `d_handle' undeclared (first use this
   function)
CEGUIFactoryModule.cpp:88: error: (Each undeclared identifier is reported only
   once for each function it appears in.)
CEGUIFactoryModule.cpp:88: error: `DYNLIB_LOAD' undeclared (first use this
   function)
CEGUIFactoryModule.cpp:96: error: `DYNLIB_GETSYM' undeclared (first use this
   function)
CEGUIFactoryModule.cpp:101: error: `DYNLIB_UNLOAD' undeclared (first use this
   function)
CEGUIFactoryModule.cpp: In destructor `virtual
   CEGUI::FactoryModule::~FactoryModule()':
CEGUIFactoryModule.cpp:114: error: `DYNLIB_UNLOAD' undeclared (first use this
   function)
make[2]: *** [CEGUIFactoryModule.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
 g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/usr/include/freetype2
-g -O2 -MT CEGUIFont_xmlHandler.lo -MD -MP -MF .deps/CEGUIFont_xmlHandler.Tpo -c
 CEGUIFont_xmlHandler.cpp -o CEGUIFont_xmlHandler.o >/dev/null 2>&1
make[2]: Leaving directory `/cygdrive/c/work/cegui_mk2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/c/work/cegui_mk2/src'
make: *** [all-recursive] Error 1


as far, as i understand, g++ doesn't set __WIN32__, _WIN32.
what to put in CEGUIFactoryModule.h?

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

Re: building cegui in cygwin environment

Postby CrazyEddie » Fri Mar 18, 2005 22:04

I've not tried cygwin, though can see that the system is likely to get confused. Did you try defining __WIN32__ or _WIN32 in CFLAGS passed to configure?

CE.

acb
Just popping in
Just popping in
Posts: 1
Joined: Wed Mar 01, 2006 18:18

Postby acb » Wed Mar 01, 2006 19:48

I tried defining both in CFLAGS passed to configure -- did not seem to have an effect (same error messages). When passing -D__WIN32__ as CPPFLAGS passed to configure, it did have an effect (different error message produced):

Code: Select all

Making all in .
make[1]: Entering directory `/cygdrive/d/Profiles/ra7056/code/cegui_mk2/build.20060301'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/cygdrive/d/Profiles/ra7056/code/cegui_mk2/build.20060301'
Making all in src
make[1]: Entering directory `/cygdrive/d/Profiles/ra7056/code/cegui_mk2/build.20060301/src'
Making all in .
make[2]: Entering directory `/cygdrive/d/Profiles/ra7056/code/cegui_mk2/build.20060301/src'
if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../src -I../include -I../../include -I/usr/include/freetype2    -D__WIN32__  -g -O2 -MT CEGUIFont.lo -MD -MP -MF ".deps/CEGUIFont.Tpo" \
  -c -o CEGUIFont.lo `test -f '../../src/CEGUIFont.cpp' || echo '../../src/'`../../src/CEGUIFont.cpp; \
then mv -f ".deps/CEGUIFont.Tpo" ".deps/CEGUIFont.Plo"; \
else rm -f ".deps/CEGUIFont.Tpo"; exit 1; \
fi
 g++ -DHAVE_CONFIG_H -I. -I../../src -I../include -I../../include -I/usr/include/freetype2 -D__WIN32__ -g -O2 -MT CEGUIFont.lo -MD -MP -MF .deps/CEGUIFont.Tpo -c ../../src/CEGUIFont.cpp  -DPIC -o .libs/CEGUIFont.o
../../src/CEGUIFont.cpp:52: error: definition of static data member 'CEGUI::Font::DefaultColour' of dllimport'd class.
../../src/CEGUIFont.cpp:52: warning: 'CEGUI::Font::DefaultColour' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:220: warning: function 'size_t CEGUI::Font::getCharAtPixel(const CEGUI::String&, size_t, float, float) const' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:220: warning: 'size_t CEGUI::Font::getCharAtPixel(const CEGUI::String&, size_t, float, float) const' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:257: warning: function 'size_t CEGUI::Font::drawText(const CEGUI::String&, const CEGUI::Rect&, float, const CEGUI::Rect&, CEGUI::TextFormatting, const CEGUI::ColourRect&, float, float) const' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:257: warning: 'size_t CEGUI::Font::drawText(const CEGUI::String&, const CEGUI::Rect&, float, const CEGUI::Rect&, CEGUI::TextFormatting, const CEGUI::ColourRect&, float, float) const' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:549: warning: function 'void CEGUI::Font::drawGlyphToBuffer(CEGUI::argb_t*, CEGUI::uint)' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:549: warning: 'void CEGUI::Font::drawGlyphToBuffer(CEGUI::argb_t*, CEGUI::uint)' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:589: warning: function 'size_t CEGUI::Font::drawWrappedText(const CEGUI::String&, const CEGUI::Rect&, float, const CEGUI::Rect&, CEGUI::TextFormatting, const CEGUI::ColourRect&, float, float) const' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:549: warning: 'void CEGUI::Font::drawGlyphToBuffer(CEGUI::argb_t*, CEGUI::uint)' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:589: warning: function 'size_t CEGUI::Font::drawWrappedText(const CEGUI::String&, const CEGUI::Rect&, float, const CEGUI::Rect&, CEGUI::TextFormatting, const CEGUI::ColourRect&, float, float) const' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:589: warning: 'size_t CEGUI::Font::drawWrappedText(const CEGUI::String&, const CEGUI::Rect&, float, const CEGUI::Rect&, CEGUI::TextFormatting, const CEGUI::ColourRect&, float, float) const' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:638: warning: function 'size_t CEGUI::Font::getNextWord(const CEGUI::String&, size_t, CEGUI::String&) const' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:638: warning: 'size_t CEGUI::Font::getNextWord(const CEGUI::String&, size_t, CEGUI::String&) const' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:649: warning: function 'void CEGUI::Font::drawTextLine(const CEGUI::String&, const CEGUI::Vector3&, const CEGUI::Rect&, const CEGUI::ColourRect&, float, float) const' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:649: warning: 'void CEGUI::Font::drawTextLine(const CEGUI::String&, const CEGUI::Vector3&, const CEGUI::Rect&, const CEGUI::ColourRect&, float, float) const' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:679: warning: function 'void CEGUI::Font::drawTextLineJustified(const CEGUI::String&, const CEGUI::Rect&, const CEGUI::Vector3&, const CEGUI::Rect&, const CEGUI::ColourRect&, float, float) const' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:679: warning: 'void CEGUI::Font::drawTextLineJustified(const CEGUI::String&, const CEGUI::Rect&, const CEGUI::Vector3&, const CEGUI::Rect&, const CEGUI::ColourRect&, float, float) const' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:724: warning: function 'void CEGUI::Font::constructor_impl(const CEGUI::String&, const CEGUI::String&, const CEGUI::String&, CEGUI::uint, CEGUI::uint, const CEGUI::String&)' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:724: warning: 'void CEGUI::Font::constructor_impl(const CEGUI::String&, const CEGUI::String&, const CEGUI::String&, CEGUI::uint, CEGUI::uint, const CEGUI::String&)' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:794: warning: function 'void CEGUI::Font::load(const CEGUI::String&, const CEGUI::String&)' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:794: warning: 'void CEGUI::Font::load(const CEGUI::String&, const CEGUI::String&)' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:827: warning: function 'void CEGUI::Font::unload()' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:827: warning: 'void CEGUI::Font::unload()' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:827: warning: function 'void CEGUI::Font::unload()' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:827: warning: 'void CEGUI::Font::unload()' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:853: warning: function 'void CEGUI::Font::defineFontGlyphs_impl()' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:853: warning: 'void CEGUI::Font::defineFontGlyphs_impl()' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:907: warning: function 'void CEGUI::Font::calculateStaticVertSpacing()' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:907: warning: 'void CEGUI::Font::calculateStaticVertSpacing()' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:960: warning: function 'void CEGUI::Font::notifyScreenResolution(const CEGUI::Size&)' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:960: warning: 'void CEGUI::Font::notifyScreenResolution(const CEGUI::Size&)' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:1002: warning: function 'void CEGUI::Font::updateFontScaling()' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:1002: warning: 'void CEGUI::Font::updateFontScaling()' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:1034: warning: function 'void CEGUI::Font::createFontFromFT_Face(CEGUI::uint, CEGUI::uint, CEGUI::uint)' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:1034: warning: 'void CEGUI::Font::createFontFromFT_Face(CEGUI::uint, CEGUI::uint, CEGUI::uint)' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:1149: warning: function 'float CEGUI::Font::getFormattedTextExtent(const CEGUI::String&, const CEGUI::Rect&, CEGUI::TextFormatting, float) const' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:1149: warning: 'float CEGUI::Font::getFormattedTextExtent(const CEGUI::String&, const CEGUI::Rect&, CEGUI::TextFormatting, float) const' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:1209: warning: function 'float CEGUI::Font::getWrappedTextExtent(const CEGUI::String&, float, float) const' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp:1209: warning: 'float CEGUI::Font::getWrappedTextExtent(const CEGUI::String&, float, float) const' defined locally after being referenced with dllimport linkage
../../src/CEGUIFont.cpp:56: error: definition of static data member 'CEGUI::Font::FontSchemaName' of dllimport'd class.
../../src/CEGUIFont.cpp:53: error: definition of static data member 'CEGUI::Font::InterGlyphPadSpace' of dllimport'd class.
../../src/CEGUIFont.cpp: In member function `CEGUI::uint CEGUI::Font::getRequiredTextureSize(CEGUI::utf32, CEGUI::utf32)':
../../src/CEGUIFont.cpp:361: warning: function 'CEGUI::uint CEGUI::Font::getRequiredTextureSize(const CEGUI::String&)' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp: In member function `CEGUI::uint CEGUI::Font::getRequiredTextureSize(CEGUI::utf32, CEGUI::utf32)':
../../src/CEGUIFont.cpp:361: warning: function 'CEGUI::uint CEGUI::Font::getRequiredTextureSize(const CEGUI::String&)' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp: In member function `float CEGUI::Font::getWrappedTextExtent(const CEGUI::String&, float, float) const':
../../src/CEGUIFont.cpp:187: warning: function 'float CEGUI::Font::getTextExtent(const CEGUI::String&, float) const' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp: In member function `void CEGUI::Font::defineFontGlyphs_impl()':
../../src/CEGUIFont.cpp:420: warning: function 'void CEGUI::Font::createFontGlyphSet(const CEGUI::String&, CEGUI::uint, CEGUI::argb_t*)' is defined after prior declaration as dllimport: attribute ignored
../../src/CEGUIFont.cpp: In member function `void CEGUI::Font::defineFontGlyphs(CEGUI::utf32, CEGUI::utf32)':
../../src/CEGUIFont.cpp:348: warning: function 'void CEGUI::Font::defineFontGlyphs(const CEGUI::String&)' is defined after prior declaration as dllimport: attribute ignored
make[2]: *** [CEGUIFont.lo] Error 1
make[2]: Leaving directory `/cygdrive/d/Profiles/ra7056/code/cegui_mk2/build.20060301/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/d/Profiles/ra7056/code/cegui_mk2/build.20060301/src'
make: *** [all-recursive] Error 1


(this was with 4.1 code). Any ideas?

User avatar
netangel
Just popping in
Just popping in
Posts: 2
Joined: Tue Nov 15, 2005 20:02
Contact:

Postby netangel » Fri Jun 16, 2006 22:27

I've managed to build cegui lib !! (0.4.1 of the source code for Crazy Eddie's GUI System Mk-2, for linux and MacOS)

I first tried a long time ago to build cegui in mingw ( see http://www.cegui.org.uk/phpBB2/viewtopic.php?t=1097 ).
This time, I'm trying to build the lib under cygwin.
I managed to pass that problem :
modify /include/CEGUIFactoryModule.h, line 45 :

Code: Select all

#elif defined(__linux__) || defined(__CYGWIN__)
#    if defined(__CYGWIN__)
#        include <dlfcn.h>
#    endif
#    define DYNLIB_HANDLE void*
#    define DYNLIB_LOAD( a ) dlopen( a, RTLD_LAZY )
#    define DYNLIB_GETSYM( a, b ) dlsym( a, b )
#    define DYNLIB_UNLOAD( a ) dlclose( a )
#    define DYNLIB_ERROR( ) dlerror( )

It would good if any developper includes that patch on next release ;)

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Thu Jan 03, 2008 19:57

You meant (or the current version has moved code into) CEGUIDynamicModule.h, such that the section

Code: Select all

#if defined(__WIN32__) || defined(_WIN32)
#    define DYNLIB_HANDLE hInstance
#    define DYNLIB_LOAD( a ) LoadLibrary( a )
#    define DYNLIB_GETSYM( a, b ) GetProcAddress( a, b )
#    define DYNLIB_UNLOAD( a ) !FreeLibrary( a )

    struct HINSTANCE__;
    typedef struct HINSTANCE__* hInstance;

#elif defined(__linux__)
#    define DYNLIB_HANDLE void*
#    define DYNLIB_LOAD( a ) dlopen( a, RTLD_LAZY )
#    define DYNLIB_GETSYM( a, b ) dlsym( a, b )
#    define DYNLIB_UNLOAD( a ) dlclose( a )
#    define DYNLIB_ERROR( ) dlerror( )

#elif defined(__APPLE_CC__)
#    define DYNLIB_HANDLE CFBundleRef
#    define DYNLIB_LOAD( a ) mac_loadExeBundle( a )
#    define DYNLIB_GETSYM( a, b ) mac_getBundleSym( a, b )
#    define DYNLIB_UNLOAD( a ) mac_unloadExeBundle( a )
#    define DYNLIB_ERROR( ) mac_errorBundle()
#endif


becomes

Code: Select all

#if defined(__WIN32__) || defined(_WIN32)
#    define DYNLIB_HANDLE hInstance
#    define DYNLIB_LOAD( a ) LoadLibrary( a )
#    define DYNLIB_GETSYM( a, b ) GetProcAddress( a, b )
#    define DYNLIB_UNLOAD( a ) !FreeLibrary( a )

    struct HINSTANCE__;
    typedef struct HINSTANCE__* hInstance;

#elif defined(__linux__) || defined(__CYGWIN__)
#    if defined(__CYGWIN__)
#        include <dlfcn.h>
#    endif
#    define DYNLIB_HANDLE void*
#    define DYNLIB_LOAD( a ) dlopen( a, RTLD_LAZY )
#    define DYNLIB_GETSYM( a, b ) dlsym( a, b )
#    define DYNLIB_UNLOAD( a ) dlclose( a )
#    define DYNLIB_ERROR( ) dlerror( )

#elif defined(__linux__)
#    define DYNLIB_HANDLE void*
#    define DYNLIB_LOAD( a ) dlopen( a, RTLD_LAZY )
#    define DYNLIB_GETSYM( a, b ) dlsym( a, b )
#    define DYNLIB_UNLOAD( a ) dlclose( a )
#    define DYNLIB_ERROR( ) dlerror( )

#elif defined(__APPLE_CC__)
#    define DYNLIB_HANDLE CFBundleRef
#    define DYNLIB_LOAD( a ) mac_loadExeBundle( a )
#    define DYNLIB_GETSYM( a, b ) mac_getBundleSym( a, b )
#    define DYNLIB_UNLOAD( a ) mac_unloadExeBundle( a )
#    define DYNLIB_ERROR( ) mac_errorBundle()
#endif

pkrcel
Just popping in
Just popping in
Posts: 4
Joined: Mon Dec 15, 2008 10:43

Building with cygwin

Postby pkrcel » Mon Dec 15, 2008 22:45

Hey there, I succeeded in building the CEGUIBase targets with cygwin, I'm working on the other targets now (well, will prolly be tomorrow....)

This is on version 0.6.2 downloadable source package.

I thought I could share my experience with others and get feedback, cause I NEED feedback, I ain't no expert here :-)

First of all, get the required dependencies thorugh cygwin's setup.exe, the only one I guess oyu'll not find out there in the cygnus packages is DevIL, i'll try compiling this later on.

Either run "./configure" in CEGUI root dir (wherever you unpacked the source zip/tarball) or use premake to generate your projects of choice, I used premake to generate Code::Blocks workspaces. the CEGUIBASE targets, you will have to modifiy two sources

In in Include\CEGUIDynamicModule.h, line 45

Code: Select all

#elif defined(__linux__) || defined(__CYGWIN__)
#    if defined(__CYGWIN__)
#        include <dlfcn.h>
#    endif
#    define DYNLIB_HANDLE void*
#    define DYNLIB_LOAD( a ) dlopen( a, RTLD_LAZY )
#    define DYNLIB_GETSYM( a, b ) dlsym( a, b )
#    define DYNLIB_UNLOAD( a ) dlclose( a )
#    define DYNLIB_ERROR( ) dlerror( )


it's enough to get the basic dynamic lib definitions.

(The post above seem to set redundant #include statements)

In src\CEGUIsystem.cpp, line 96

Code: Select all

#if defined(__WIN32__) || defined(_WIN32) || defined(__CYGWIN__)
#include <windows.h>
double SimpleTimer::currentTime()
{
    return timeGetTime() / 1000.0;
}

#elif defined(__linux__) || defined(__APPLE__) // || defined(__CYGWIN__)
#include <sys/time.h>
double SimpleTimer::currentTime()
{
    timeval timeStructure;
    gettimeofday(&timeStructure, 0);
    return timeStructure.tv_sec + timeStructure.tv_usec / 1000000.0;
}
#else
#error "SimpleTimer not available for this platform, please implement it"
#endif


you can put the defined(__CYGWIN__) directive in either place, I *guess* that if you end up including the W32api <windows.h> (as in the above snipped), you should not depend on the cygwin's DLL to have the system timer, while if you swap the statements, the timer functions in system lib header sys/time.h WILL depend on Cygwin DLL.

I have no evidence of this as of now cause I had not the chance to test out the built libraries, but I appreciate anyone who would comment on this one.

To get the libraries linked in the DEBUG* targets, you should remove "_d" both from pcre/freetype dependencies cause following these steps will endup in having only the relase libs installed in cygwin.
(btw, inlcudes are in /usr/include, /usr/include/freetype and libs are in /usr/libs of cygwin environment.)

By now I succeded in building all DEBUG+RELEASE targets but the STATIC ones...just ran out of time.

Hope anybody will feedback at me.

Cheers
-Andy

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Tue Dec 16, 2008 09:47

Nothing to say but good work !
I hope someday there will be pre-built binaries of every CEGUI release for a cygwin system, maybe I would start using that instead of visual c++ !

One thing to add to you is that I once tried this too, got everything to build (only in static !) but at the time linking my (static) CEGUI libs with my project had some strange linker errors, figured them out, but after that the app crashed before entering main, then I gave up after a few days :)

Hope you will not encounter this problem ;)

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

Postby CrazyEddie » Tue Dec 16, 2008 10:24

Yeah, good stuff :)

With regards to the timer question, I'm not certain about dependence upon the various system DLLs, though with regards to which timer option to choose, I think the key thing there is what are cygwin users expecting when using a given project? Are the cygwin users expecting most things to be done in a linux like way, or a Windows like way? I think perhaps it's the former.

CE.

pkrcel
Just popping in
Just popping in
Posts: 4
Joined: Mon Dec 15, 2008 10:43

Postby pkrcel » Tue Dec 16, 2008 10:40

By now, I've succeded in building all targets in CEGUIBase, but I am unsure about the issue you address about "how cygwin users woudl ike their projects to behave".

Personally, I like the cygwin environment because it allows me to do things I usually do on linux on my windows machine but, still, I'd like to have my Windows project to be NOT dependent on the cygwin's DLL, there will be PLENTY of DLLs on which my projects will depend, and none of them (for what I could forecast right now) should use any of the non-native features cygwin provides, hence no need to have to distribute also cygwin1.dll along with my apps :)

I'd also try to add the -mnocygwin option the compiler's command line.

I'm also fond of mingw32, if you might wonder, but there.. to install a good deal of the libraries needed to obtain GCEGUI I'd have to use MSYS and launch (for instance) ./configure.

THe cygwin command line allows me to quickly locate things lik on my Linux terminal....I guess it's only a matter of habit, really.

Anyway I'll try to build all the possible targets into the CEGUI workspace and then will move to the samples, to test the libraries.

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

Postby CrazyEddie » Tue Dec 16, 2008 11:04

pkrcel wrote:I'd like to have my Windows project to be NOT dependent on the cygwin's DLL, there will be PLENTY of DLLs on which my projects will depend, and none of them (for what I could forecast right now) should use any of the non-native features cygwin provides, hence no need to have to distribute also cygwin1.dll along with my apps :)

Cool. So much for my theory, hehe :)

pkrcel wrote:I'm also fond of mingw32, if you might wonder, but there..

Yeah, mingw32 based compilation of CEGUI is something we're actually able to more readily support, mainly because it's something that I provided as an interest to myself (I use mingw32 on linux to cross compile CEGUI - because I get a kick out of it :lol: ).

pkrcel wrote:to install a good deal of the libraries needed to obtain GCEGUI I'd have to use MSYS and launch (for instance) ./configure.

I think the lack of a proper mingw32 dependencies package is a shame. I might get around to providing one some time - I have a few bits built for my cross-compile adventures, I thought I had a link to them on the forum somewhere...

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 15 guests