1
votes

I have added the cross compiler arm-linux-gnueabi into codelite and successfully cross-compiled a sample C program.

Now I'm trying to cross-compile a wxwidget sample program.

Initially it was throwing me errors in setup.h.

I created a link for /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h with /usr/include/wx/setup.h. Now its giving me around 159 errors. I give you some of them for your reference.

 /usr/include/wx/defs.h:42:13: error: #error "No Target! You should use wx-config program for compilation flags!"
In file included from /usr/include/wx/cursor.h:24:0,
                 from /usr/include/wx/event.h:22,
                 from /usr/include/wx/wx.h:25,
                 from main.cpp:14:
/usr/include/wx/gtk/cursor.h:40:5: error: ‘GdkCursor’ does not name a type
In file included from /usr/include/wx/app.h:570:0,
                 from /usr/include/wx/wx.h:26,
                 from main.cpp:14:
/usr/include/wx/gtk/app.h:55:5: error: ‘guint’ does not name a type
/usr/include/wx/gtk/app.h:65:5: error: ‘GdkVisual’ does not name a type

When I add wx-config --libs wx-config --cxxflags to my build command it gives me in compatible library errors..

These are the erros I'm stuck on with..

/usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lwx_gtk2u_richtext-2.8 /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lwx_gtk2u_aui-2.8 /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lwx_gtk2u_xrc-2.8 /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lwx_gtk2u_qa-2.8 /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lwx_gtk2u_html-2.8 /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lwx_gtk2u_adv-2.8 /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lwx_gtk2u_core-2.8 /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lwx_baseu_xml-2.8 /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lwx_baseu_net-2.8 /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lwx_baseu-2.8 collect2: ld returned 1 exit status

I think I'm doing something wrong in linking libraries for cross compiler. Can anyone help me on this.. I would appreciate any help..

-Thanks in advance

1
Seems like you have posted the errors you have fixed. You should post the errors that have you stuck.ravenspoint
Thanks for your suggestion.. I have edited my question with the errors I'm stuck on with.. Hope it would get me some help..Cruiser
Does wx_gtk2u_richtext-2.8 etc exist anywhere?ravenspoint
I can see a folder named richtext in the path /usr/include/wx/Cruiser
That will contain the .h files. The linker is looking for the built libraries. Have you built the libraries?ravenspoint

1 Answers

0
votes

It looks like you didn't cross-compile wxWidgets itself. Or didn't install it if you did.

The thing to keep in mind is that you absolutely shouldn't need to manually create any links. In particular, the one you already made for wx/setup.h will almost certainly break your other builds, don't do this. Just use the correct wx-config for the cross-build.