Compiling using Netbeans

From WxWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

To compile on windows using Netbeans

  • This assumes you've installed Netbeans (currently version 6.9) and Cygwin/minGW.
  • This assumes that you have a working wxWidgets installation

Preparing the environment

  • Download the Windows Version of wx-config here
  • Put the file into any folder that is listed in the Path Variable of Windows ( or create a new folder, and add it's location to the Windows Path Variable (System -> Advanced -> Environmental Variables -> System Varialbles -> Find Path Variable -> add your directory
  • Create a new System Variable. Name: WXWIN, Value: Absolute Path to your wxWidgets installation directory
  • Create a new System Variable. Name: WXCFG, Value: Depends on the way you compiled wxWidgets. ( check your wxWidgets\lib folder if you are not shure ) examples: gcc_dll\mswud or gcc_lib\mswud (debug Versions) gcc_dll\mswu (release Versions) .....

To make sure everything works as expected fire up the command prompt or msys and type:

wx-config --libs or wx-config --cxxflags

This should print out informations for the compiler. If it does work, you're almost done

Setting up Netbeans to compile wxWidgets projects

Necessary steps for each project

Open up the project properties

  • C++ Compiler
 Include Directories -> absolute/wxWidgets/installation/path/include
 Additional Options -> `wx-config --cxxflags` (the backticks are important)
  • Linker
 Libraries -> Add Option -> Other Option -> `wx-config --libs`

Thats all, now you should be able to build wxWidgets GUI apllications from within NetBeans.