I'm trying to set up my Netbeans IDE so that it is capable of compiling wxWidgets projects.
There is very similar question: Setup wxWidget in Netbeans 6.1 C++ On MS Windows? but the answer is not working for me. And the mentioned versions are a bit outdated.
I use the mingw package for compilation. There is no problem compiling a small hello World App from the console using this command in mysys:
$ g++ hello.cpp `wx-config --libs` `wx-config --cxxflags` -o hello.exe
So here's what I tried in Netbeans:
Project properties:
- C++ Compiler -> Additional Options:
wx-config cxxflags
(surrounded by backticks) - C++ Compiler -> Include directories: installation_Path/include
- Linker -> Additional Options:
wx-config --libs
(surrounded by backticks)
The command lines Netbeans creates when I try to compile seem to be correct to me
g++.exe `wx-config --cxxflags` -c -g -I/D/lib/wxWidgets/include -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp
This compiles without errors
g++.exe `wx-config --cxxflags` `wx-config --libs` -o dist/Debug/MinGW-Windows/wxwidgetstest build/Debug/MinGW-Windows/main.o -L/D/lib/wxWidgets/lib/gcc_lib
But during the linking process I get loads of errors...
Questions:
- Does anybody have a working configuration for compiling wxWidgets Projects from within Netbeans and can help me out
- Or does anybody see an error in the command lines could be the reason for the linking problems ?
Thank you very much!