setting up toolchain with wxwidgets and crosstool-ng

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
j35t3r
In need of some credit
In need of some credit
Posts: 1
Joined: Wed Dec 28, 2016 8:36 pm

setting up toolchain with wxwidgets and crosstool-ng

Post by j35t3r » Wed Dec 28, 2016 8:42 pm

Hi,

I want to setup the ct-ng for my gui application and now I want to use wxwidgets. I am working on arch linux, but it should work on windows as well.

For setting up the crosstool, I have used:

Code: Select all

# Install prerequisites:
apt-get -y install gcc gperf bison flex gawk  libtool automake     libncurses5-dev texinfo

# Setup toolchain
# instructions from https://github.com/crosstool-ng/crosstool-ng
cd toolchain/crosstool-ng
./bootstrap
./configure --prefix=$HOME/.local
make && make install

echo -ne "\n\nif [ -d \"$HOME/.local/bin\" ]; then\n  PATH=\"$HOME/.local/bin:$PATH\"\nfi" >> ~/.profile
source ~/.profile

mkdir ../tc/
cd ../tc/
ct-ng list-samples
ct-ng x86_64-w64-mingw32
ct-ng build # lasts 30 minutes...

##################### WxWidgets ######################
cd ../wxWidgets/
mkdir -p build
cd build
../configure && make -j
make
The only way I have found is to clone wxwidgets from github and compile it as above in the script. Then, I included as path -I

Code: Select all

WXWIDGET=../toolchain/wxWidgets/include/
$(CXX) -I$(FLEX) -I$(WXWIDGET) $(WXWIDGETSFLAGS) $(CPPFLAGS) $(header) $(src) $(obj3) -o $(OUTPUT)/$(bin)
Hundreds of errors appearing while compiling:

Code: Select all

In file included from ../toolchain/wxWidgets/include/wx/platform.h:485:0,
             from ../toolchain/wxWidgets/include/wx/defs.h:20,
             from ../toolchain/wxWidgets/include/wx/string.h:24,
             from ../toolchain/wxWidgets/include/wx/artprov.h:14,
             from parser/include/gui.h:17,
             from parser/include/customdialogs.h:17:
../toolchain/wxWidgets/include/wx/chkconf.h:282:9: error: #error     "wxUSE_SECRETSTORE must be defined, please read comment near the top of this file."
  #       error "wxUSE_SECRETSTORE must be defined, please read comment near the top of this file."
What should I do?

Edit:

I think I am setting up wxwidgets wrong:

../configure --enable-unicode --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32

Code: Select all

configure:3601: checking build system type
configure:3615: result: x86_64-unknown-linux-gnu
configure:3635: checking host system type
configure:3648: result: x86_64-w64-mingw32
configure:4375: checking for toolkit
configure:4439: result: msw
configure:12343: checking for x86_64-w64-mingw32-gcc
configure:12373: result: no
configure:12383: checking for gcc
configure:12399: found /usr/bin/gcc
configure:12410: result: gcc
configure:12639: checking for C compiler version
configure:12648: gcc --version >&5
and then i get the error:

Code: Select all

checking for w32api.h... no
checking for windows.h... no
configure: error: please set CFLAGS to contain the location of windows.h

Post Reply