MingGW build attempt
Bernhard Reiter
bernhard at intevation.de
Wed Mar 29 12:10:56 CEST 2006
One step further in building Thuban 1.1.0 with MinGW.
Am 28. Mar 2006 um 23:30:47 schrieb Bernhard Reiter:
> Am 28. Mar 2006 um 21:27:00 schrieb Bernhard Reiter:
> > This evening I gave it a shot to build Thuban 1.1.0 on Windows XP SP2
> > using MingGW.
> Proposed fix (untested):
> adding a #undef LP
> in a line right after the
> #undef PVALUE
> in thuban/libraries/thuban/wxproj.cpp
The fix worked and I can now compile wxproj.cpp,
but linking still fails.
I have fiddled with the paths within setup.py.
In the end here are a few sections, I have tried last:
# Directories where Proj4 is installed
proj4_prefix = os.path.join(basedir, "..", "proj", "bin")
proj4_incdir = proj4_prefix
proj4_libdir = proj4_prefix
proj4_lib = "proj"
# Define include and lib directories for wxWindows and
wx_prefix = os.path.join(basedir, "..", "wxPython-2.6.3.0")
wx_inc = [os.path.join(wx_prefix, 'lib', 'vc_dll', 'mswuh'),
os.path.join(wx_prefix, "include")]
wx_lib = [os.path.join(wx_prefix, "lib"),
os.path.join(wx_prefix, 'lib', 'vc_dll')]
wx_cs_params[CS_LIBS] = ["wxmsw26uh_vc"] \
+ ['kernel32', 'user32', 'gdi32', 'comdlg32',
'winspool', 'winmm', 'shell32',
'comctl32', 'ctl3d32', 'odbc32', 'ole32', 'oleaut32',
'uuid', 'rpcrt4', 'advapi32', 'wsock32']
I had to remove "oldnames" from the libs.
No idea about the consequences.
I have used pexport again in vc_dll:
C:\thuban-build\pexports-0.42h\bin\pexports.exe wxmsw26uh_vc.dll >wxmsw26uh_vc.def
dlltool --dllname msw26uh_stc_vc.dll --def wxmsw26uh_vc.def --output-lib libwxmsw26uh_vc.a
Now it looks like there is some symbol missmatch or other bug,
as wxmsw26uh_vc.def shows that the symbol (wxTRANSPARENT_BRUSH) is there:
writing build\temp.win32-2.4\Release\libraries\thuban\wxproj.def
C:\MinGW\bin\g++.exe -mno-cygwin -shared -s build\temp.win32-2.4\Release\librari
es\thuban\wxproj.o build\temp.win32-2.4\Release\libraries\thuban\wxproj.def -L..
\proj\bin -L..\wxPython-2.6.3.0\lib -L..\wxPython-2.6.3.0\lib\vc_dll -Lc:\python
24\libs -Lc:\python24\PCBuild -lproj -lwxmsw26uh_stc_vc -lkernel32 -luser32 -lgd
i32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -lole3
2 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lpython24 -lmsvcr71 -o build\
lib.win32-2.4\Lib\wxproj.pyd
build\temp.win32-2.4\Release\libraries\thuban\wxproj.o:wxproj.cpp:(.text+0x5f6):
undefined reference to `_imp__wxTRANSPARENT_BRUSH'
build\temp.win32-2.4\Release\libraries\thuban\wxproj.o:wxproj.cpp:(.text+0x601):
undefined reference to `_imp__wxTRANSPARENT_PEN'
build\temp.win32-2.4\Release\libraries\thuban\wxproj.o:wxproj.cpp:(.text+0x65f):
undefined reference to `_imp__wxTRANSPARENT_PEN'
build\temp.win32-2.4\Release\libraries\thuban\wxproj.o:wxproj.cpp:(.text+0x683):
undefined reference to `_imp__wxTRANSPARENT_BRUSH'
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1
Strange is that there is only one underscore before the 'imp'.
I am unsure how to resolve this. It is either related to dynamic libraries
or the C++ object code encoding.
Any hints appreciated.
One hard long way to try would be to rebuild wxPython with MinGW.
But there might be an easier solution.
Didrik, Visual Studio should be easier.
You will still need to fiddle with the libraries in setup.py,
as I did above. wxmsw26uh_vc should be fine and enough to link, I guess.
Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060329/4fa03e35/attachment.bin
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)