开发者

Setting up Netbeans to compile wxWidgets projects under Windows

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开发者_如何学JAVA 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!


I finally found the solution, and wrote a guide for anyone who might encounter the same problem in the future.

wxWidgets wiki: Compiling using Netbeans

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜