0

I develop on Windows7 and need to cross-compile for a Beaglebone Black (running a Debian Jessie linux) Using a Linaro toolchain, I'm able to compile a "Hello Word" console executable using various IDEs (Codelite, Code::Block and Eclipse DS-5).

Now I need to add wxWidgets in the toolchain, and debug it on Windows and release on the BBB.

I have no problem at compiling and debugging for Windows, but I don't know how to add the wxWidgets to the toolchains.... what wx sources i need (linux, i suppose, but how to build it?) and how to add them in the chain? What should i apt-get on the BBB?

Parduz
  • 662
  • 5
  • 22

1 Answers1

0

Please download the wxWidgets-3.1 and unpack it. Then do the following:

  1. cd wxWidgets
  2. mkdir buildBeagle
  3. cd buildBeagle
  4. ../configure --enable-gtk --host='you_host_option' --target='you_target_option'
  5. make

After that you do:

  1. cd samples/minimal
  2. make

Copy the resulting executable to the board and try to run it.

If you get any issues please let us know.

I presume you know how to properly set the host and target options. If not - let us know and someone will be able to help.

Igor
  • 5,620
  • 11
  • 51
  • 103
  • I tried, failing to run the gcc until i remembered that i already had that problem, so i manually added a i686 dir under the buildBeagle one.....then i failed again, this time after a lot of cheching. The command line was (after entering in the MSYS shell): $ ../configure -disable-shared -enable-debug -enable-gtk CC=C:/SVILUPPO/TOOLS/gcc-linaro-4.9-2015.05-1-rc1-i686-mingw32_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc --host=arm-linux-gnueabihf --target=i686-pc-mingw32 ... where should i copy/paste che configure.log file? – Parduz Feb 07 '17 at 16:09
  • @Parduz, use pastebin service. Or just look at the end of the file and post the error line. BTW, I think you host and target are switched, as you said you are working on Windows and compiling for Linux. – Igor Feb 07 '17 at 17:38
  • Ok, [here](http://pastebin.com/tuy8ejpD) it is. About _host_ and _target_ , I looked at this [question](http://stackoverflow.com/questions/5139403/whats-the-difference-of-configure-option-build-host-and-target). Have I misunderstood the answers? – Parduz Feb 08 '17 at 08:16
  • @Parduz, as noted as accepted answer you should use "--build" and "--host" options when building the software and not the toolchain. Did you try that? "--host" is used to build the toolchain. – Igor Feb 09 '17 at 04:18
  • Sorry.... wrong ENTER key press....I still can't compile: [Here](http://pastebin.com/gumFg71T) the cmd window and the log file (while trying another toolchain from Sysprogs gnutoolchain) and [here] (http://pastebin.com/M1QSmgrR) while trying with the Linaro one. I really don't know what i'm doing wrong. – Parduz Feb 09 '17 at 11:32
  • @Parduz, it looks like both compilers does not support -V option. What is the output of C:/Sysgcc/Beaglebone/bin/arm-linux-gnueabihf-gcc -V? There are more errors inside the config.log. At this point I would suggest either looking at how GTK+ was built (if you did build it yourself) or post to wx-user ML so that more people (notably Vadim/Paul) can look at that. When you post make sure you send links to the config.log from both compilers and the make output if any. – Igor Feb 10 '17 at 03:09
  • None of the various _*gcc.exe_ (being "pure", i686*gcc, arm*gcc) support that paramenter. The versions i have are: ` gcc version 4.8.0 (rev2, Built by MinGW-builds project) - gcc version 4.8.1 (GCC) - gcc version 4.8.2 20131014 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.10 - Linaro GCC 2013.10) - gcc version 4.9.2 (Debian 4.9.2-10) - gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) - ` I know nothing about GTK+.. each "version" of the compiler i have has a _pkgconfig_ folder and in some of them a _gtk_ folder. But i thought that wxWidget had it already in the sources.... – Parduz Feb 10 '17 at 10:16
  • 1
    @Parduz, as Vadim said on the ML, you need to either compile GTK+ yourself or find the distribution for your target. wxWidgets does not have GTK+ sources as this library is huge (including all of its dependencies). What it does have is the code to wraps GTK+ functionality in wx API. – Igor Feb 10 '17 at 17:17