wxArt2D Installation Issues Hints

Environment: Visual Studio 2008 Express (Visual C++ 9.0), DialogBocks, 
wxWidgets-2.8.8, wxArt2D sources from 2008-07-27

During installation and trying to get the samples of wxArt2D running I 
came along some issues (stc, manifest and static builds), for which I 
could not find good documentation but managed to get at least a work 
around. May this be more helpful than irritating (or worse, wrong) for 
other newcomers like me.

1) CMake complains
D:/wxArt2D/bin/FindwxWidgets.cmake(752): - not found due to missing 
WX_stcd=WX_stcd-NOTFOUND
CMake Error at bin/FindwxWidgets.cmake:1009 (MESSAGE):
   wxWidgets required, please specify it's location.

You need (at least) one more lib from wxWidgets, it's located in
wxWidgets-2.8.8\contrib\src\stc
Build it as you did build wxWidgets itself.


2) When you build everything straight ahead, the wxArt2D examples will cause
CVTRES : fatal error CVT1100: duplicate resource.  type:MANIFEST, 
name:1, language:0x0409
LINK : fatal error LNK1123: failure during conversion to COFF: file 
invalid or corrupt

In CMake (I use GUI version) (activate "Show Advanced Entries"), after 
first config run,
set within CMAKE_EXE_LINKER_FLAGS /MANIFEST:NO instead of /MANIFEST

However, I do not understand enough about manifests, so maybe manifest 
handling is broken somewhere else (e.g. wxWidgets' wx.rc).


3) Static libraries

By default everything is set to DLLs and should build fine. But if you 
want to switch to static linking
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other 
libs; use /NODEFAULTLIB:library
or
STATUS_DLL_NOT_FOUND exception
or similar are common (again, the wxArt2D examples are used). Once I 
even managed to build something without any error or warning, but that 
was not executable at all.

Let's assume you have built wxWidgets like
nmake -f makefile.vc RUNTIME_LIBS=static BUILD=debug USE_OPENGL=1

Now CMake signals wxWidgets_USE_Shared and WXART2D_MAKE_SHARED off after 
running configure, but the compiler flags (CMAKE_C*_FLAGS_*) are not ok. 
They are still set to /MDd or /MD. Because wxWidgets was built with /MTd 
or /MT you would have the above errors.

In CMAKE_C*_FLAGS_* you need to replace /MDd by /MTd and /MD by /MT 
(total of eight times, to catch all build types)
Then you can continue with the second configure, generate and build.

For details:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/lnk4098.asp
http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx


Open points:
- What is the proper manifest handling? The present default is not 
working well.
- To get static builds properly CMake should generate the compiler flags 
according to wxWidgets_USE_SHARED
- I feel my points are like installation FAQ, anybody working on 
installation docs?

Viele Grüße, Michael

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to