User forums > General (but related to Code::Blocks)

wxWidgets cross-compile libraries for debian available on my server

<< < (2/2)

cryx:

Hi, Thank you for you great tutorial, I was following your instructions -
I installed your .deb files and also compiled a static library on my own.
I created a standard wxWidgets project (wxSmith, Dialog) which compiles fine for my Ubuntu 7.10 64bit..
But Crosscompiling does have problems: It seems to compile fine but has thousands of link reference errors:
Here is some Build output:

-------------- Build: WinRelease in crosstest ---------------
Compiling: crosstesetApp.cpp
Compiling: crosstesetMain.cpp
Linking executable: bin/WinRelease/crossteset.exe
obj/Release/crosstesetApp.o:crosstesetApp.cpp:(.text+0x47): undefined reference to `wxAppConsole::CheckBuildOptions(char const*, char const*)'
obj/Release/crosstesetApp.o:crosstesetApp.cpp:(.text+0x68): undefined reference to `wxApp::wxApp()'
obj/Release/crosstesetApp.o:crosstesetApp.cpp:(.text+0xc2): undefined reference to `wxAppConsole::ms_appInstance'
obj/Release/crosstesetApp.o:crosstesetApp.cpp:(.text+0xe6): undefined reference to `wxEntry(HINSTANCE__*, HINSTANCE__*, char*, int)'
obj/Release/crosstesetApp.o:crosstesetApp.cpp:(.text+0x146): undefined reference to `wxInitAllImageHandlers()'
..........

Does somebody know a solution to this?

I'm on Ubuntu 7.10 64 bit, Codeblocks 8.02

Jenna:
Did you setup the "Linker Settings" in the "Build Options" for your cross-target correctly ?
There should be something like:
--- Code: ---`wx-config --host=i586-mingw32msvc --static --libs`
--- End code ---

If yes , can you please turn on full commandline logging and post the output of the Build Log.
To turn it on, go to "Settings -> Compiler and Debugger... -> [your cross-compiler] -> Other settings (the rightmost tab) -> Compiler Logging" and switch it to "Full command line".

cryx:
Thanks for the answer.
Now I removed your packages and removed and  reinstalled mingw32 and did the following from scratch:
(btw, now I have a totally different problem than yesterday  :) )

I have the wxWidgets 2.8 sources and configured it with:

--- Code: ---./configure --prefix=/usr/i586-mingw32msvc --host=i586-mingw32msvc --disable-shared --enable-unicode --enable-release --build=x86_64-linux --enable-monolithic
--- End code ---
then I did make and sudo make install

I configured a new Compiler in CodeBlocks like described int the Wiki

Created a new Build also like described in the Wiki with only some changes:
other linker options: `wx-config --prefix=/usr/i586-mingw32msvc --libs --host=i586-mingw32msvc --static --unicode --release`
other compiler options: `wx-config --prefix=/usr/i586-mingw32msvc --cflags --host=i586-mingw32msvc  --unicode --release --static`

Now I get this error,

-------------- Build: WinRelease in crossteset ---------------
i586-mingw32msvc-g++ -Wall -O2 2.8 -I/usr/i586-mingw32msvc/lib/wx/include/i586-mingw32msvc-msw-unicode-release-static-2.8 -I/usr/i586-mingw32msvc/include/wx-2.8 -D__WXMSW__ -mthreads -I/usr/i586-mingw32msvc/include/ -c /home/jahn/Projects/crossteset/crosstesetApp.cpp -o obj/WinRelease/crosstesetApp.o
i586-mingw32msvc-g++ -Wall -O2 2.8 -I/usr/i586-mingw32msvc/lib/wx/include/i586-mingw32msvc-msw-unicode-release-static-2.8 -I/usr/i586-mingw32msvc/include/wx-2.8 -D__WXMSW__ -mthreads -I/usr/i586-mingw32msvc/include/ -c /home/jahn/Projects/crossteset/crosstesetMain.cpp -o obj/WinRelease/crosstesetMain.o
i586-mingw32msvc-g++: 2.8: No such file or directory
i586-mingw32msvc-g++: 2.8: No such file or directory

it seems that the command ist not build right, there is no file such as 2.8
but I really don't know where this might come from
I would appreciate any help on this.

Jenna:
Leave the --release (in the wx-config command-line) away !!!
It shows the release number and g++ interpretes it as input-file, what (of course) does not exist.

You should also be able to run wx-config without the --prefix=... switch.

cryx:
Thanks!  without the --release it worked like a charm!
But I have to use the --prefix=/usr/i586-mingw32msvc option
otherwise it won't include the right include directories and I get include errors like:
/home/cryx/Projects/crossteset/crosstesetApp.h:13:20: wx/app.h: No such file or directory

BTW: I use the --prefix=/usr/i586-mingw32msvc option also in my compiler>toolchain executables> Resource compiler setting

Maybe this is Ubuntu specific, I dont know.. 
I also think the --build=x86_64-linux  switch for ./configure was necessary , when I was configuring without it and compiling it gave me a config named msw-unicode-release-static-2.8  instead of i586-mingw32msvc-msw-unicode-release-static-2.8
I don't know if that matters  but I could post all the things I did to get it running if this might help others.

Navigation

[0] Message Index

[*] Previous page

Go to full version