Hello
I was wondering, it's possible to obtain an static library for SILLY. I want to include CEGUI in my current project, and I prefer to use static libraries. I'm using MVS2008.
Thanks a lot
mrGREEN
SILLY - STATIC LIB
Moderators: CEGUI MVP, CEGUI Team
Yes it is possible. I have set this up myself. You need to update both the Silly and SillyImageCodec projects appropriately, as well as adjust the base header file in each project. I set this up awhile ago and did not store these changes in version-control (shame on me), so I may be missing some information, but this should at least get you started:
Open the SILLY project and in SILLYBase.h look for:
change this too:
then put SILLY_STATIC in your preprocessor definitions and rebuild.
Open the CEGUISILLYImageCodec module and look for:
change this too:
then use the Relase_Static configuration and rebuild.
Open the SILLY project and in SILLYBase.h look for:
Code: Select all
#if (defined(_WIN32) || defined(__WIN32__))
# undef SILLY_OPT_INLINE // No inlining
# undef SILLY_BE // Little Endian
# ifdef SILLY_EXPORTS
# define SILLY_EXPORT __declspec(dllexport)
# else
# define SILLY_EXPORT __declspec(dllimport)
# endif
#else
# define SILLY_EXPORT
#endif
change this too:
Code: Select all
#if (defined(_WIN32) || defined(__WIN32__))
# undef SILLY_BE // Little Endian
# if defined(SILLY_STATIC)
# define SILLY_EXPORT
# else
# undef SILLY_OPT_INLINE // No inlining
# ifdef SILLY_EXPORTS
# define SILLY_EXPORT __declspec(dllexport)
# else
# define SILLY_EXPORT __declspec(dllimport)
# endif
# endif
#else
# define SILLY_EXPORT
#endif
then put SILLY_STATIC in your preprocessor definitions and rebuild.
Open the CEGUISILLYImageCodec module and look for:
Code: Select all
#if (defined( __WIN32__ ) || defined( _WIN32 ))
# ifdef CEGUISILLYIMAGECODEC_EXPORTS
# define CEGUISILLYIMAGECODEC_API __declspec(dllexport)
# else
# define CEGUISILLYIMAGECODEC_API __declspec(dllimport)
# endif
#else
# define CEGUISILLYIMAGECODEC_API
#endif
change this too:
Code: Select all
#if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
# ifdef CEGUISILLYIMAGECODEC_EXPORTS
# define CEGUISILLYIMAGECODEC_API __declspec(dllexport)
# else
# define CEGUISILLYIMAGECODEC_API __declspec(dllimport)
# endif
#else
# define CEGUISILLYIMAGECODEC_API
#endif
then use the Relase_Static configuration and rebuild.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Ok
I download SILLY and CEGUI source code and generate the silly_d.lib and CEGUISILLYImageCodec_Static.lib including the changes. Now I'm trying to execute Sample Demo 6.
I change all the Code Generation->Runtime Library to Multi-thread Debug (/MTd), and I add SILLY_STATIC and FREEGLUT_STATIC on Preprocessor.
Now I got this linking error
I generate all the CEGUI_***_Static_d.lib using Code Generation->Runtime Library to Multi-thread Debug (/MTd). What am I missing?
Do I need to generate all the other dependencies as Static Libraries?
Cheers
EDIT:
Ok I add on Linker->Input->Ignore Specific Library->LIBCMTD and it compiles and it work. But I got this warnings. So, I'll focus on eliminated this warnings
I download SILLY and CEGUI source code and generate the silly_d.lib and CEGUISILLYImageCodec_Static.lib including the changes. Now I'm trying to execute Sample Demo 6.
I change all the Code Generation->Runtime Library to Multi-thread Debug (/MTd), and I add SILLY_STATIC and FREEGLUT_STATIC on Preprocessor.
Now I got this linking error
Code: Select all
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgmalloc.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _memmove already defined in LIBCMTD.lib(memmove.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __wassert already defined in LIBCMTD.lib(wassert.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strrchr already defined in LIBCMTD.lib(strrchr.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _sprintf already defined in LIBCMTD.lib(sprintf.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _memchr already defined in LIBCMTD.lib(memchr.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strncmp already defined in LIBCMTD.lib(strncmp.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _atol already defined in LIBCMTD.lib(atox.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _vprintf already defined in LIBCMTD.lib(vprintf.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _getenv already defined in LIBCMTD.lib(getenv.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _ftell already defined in LIBCMTD.lib(ftell.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fseek already defined in LIBCMTD.lib(fseek.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
I generate all the CEGUI_***_Static_d.lib using Code Generation->Runtime Library to Multi-thread Debug (/MTd). What am I missing?
Do I need to generate all the other dependencies as Static Libraries?
Cheers
EDIT:
Ok I add on Linker->Input->Ignore Specific Library->LIBCMTD and it compiles and it work. But I got this warnings. So, I'll focus on eliminated this warnings
Code: Select all
1>freetype_D.lib(ftsystem.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(ftinit.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(ftdebug.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(ftbase.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(ftglyph.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(ftbitmap.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(bdf.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(cff.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(type1cid.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(pcf.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(pfr.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(sfnt.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(truetype.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(type1.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(type42.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(winfnt.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(raster.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(smooth.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(autofit.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(ftgzip.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(ftlzw.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(psaux.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(pshinter.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>freetype_D.lib(psnames.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\freetype_D.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>pcre_d.lib(pcre_chartables.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\pcre_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>pcre_d.lib(pcre_compile.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\pcre_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>pcre_d.lib(pcre_exec.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\pcre_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>pcre_d.lib(pcre_globals.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\pcre_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>pcre_d.lib(pcre_newline.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\pcre_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>pcre_d.lib(pcre_ord2utf8.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\pcre_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>pcre_d.lib(pcre_tables.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\pcre_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>pcre_d.lib(pcre_try_flipped.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\pcre_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>pcre_d.lib(pcre_valid_utf8.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\pcre_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>pcre_d.lib(pcre_xclass.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\pcre_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>expat_d.lib(xmlparse.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\expat_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>expat_d.lib(xmlrole.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\expat_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
1>expat_d.lib(xmltok.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../../../../dependencies/lib\expat_d.lib' or at 'c:\Rangel\PRIVATE\ENGINE\PROGRAM\CEGUI-0.6.2\Samples\bin\vc90.pdb'; linking object as if no debug info
Last edited by mrGREEN on Thu Apr 02, 2009 14:35, edited 1 time in total.
mrGREEN wrote:Do I need to generate all the other dependencies as Static Libraries?
Yup, that is correct. SILLY's dependencies where compiled with /MD (multi-threaded dll), which is why the linker is still looking for MSVCRT. I believe SILLY uses jpeg6b and libpng (which uses zlib) internally, so you will need to download those libraries and recompile them using /MT (multi-threaded).
Jamarr wrote:Yup, that is correct. SILLY's dependencies where compiled with /MD (multi-threaded dll), which is why the linker is still looking for MSVCRT. I believe SILLY uses jpeg6b and libpng (which uses zlib) internally, so you will need to download those libraries and recompile them using /MT (multi-threaded).
So it's like it's a whil(1) look-for-all-dependencies
I'll try again
Who is online
Users browsing this forum: No registered users and 10 guests