Search code examples
c++windowseclipsewxwidgets

What is different of wxWidgets between when install by MSYS and compile by MinGW?


I am learning GUI programing on Windows, and I choose wxWidgets, Eclipse, MinGW for my learning. I can compile wxWidgets with command:

mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release UNICODE=1

And I found that I can install it by MSYS by command

cd /mingw/wxWidgets-2.8.10 
./configure –prefix=/mingw –disable-shared 
make && make install 

What must I do to integrate wxWidgets with Eclipse? Do I compile it by MinGW or install it by MSYS and How can I set up it for Eclipse Neon?

`


Solution

  • From your standpoint there is no difference.

    It is better to compile the library with MinGW and do a DEBUG build since you will do development and a lot of times this will help a lot.

    Now in order to set it up with Eclipse:

    1. After you build is finished, open up Eclipse.
    2. Create a project (C++) or open an existing one.
    3. Open the dialog for project properties and find where it asks you to set the "include/header search path".
    4. Set this to be "/include;/lib/debug/include". The second path is a path to the build_directory/include where setup.h is located.
    5. In the same dialog for project properties find where it asks for a library search path.
    6. There enter "main_wx_folder/lib".
    7. Somewhere in that same page of this dialog find where it referencing the actual libraries. Add "-lwx_base... -lwx_core...". Check the actual file names inside the lib/ folder. Should be something like libwx_*.
    8. Compile the project.

    Keep in mind though that Eclipse is not "officially supported" IDE, meaning that there is no project for that IDE supplied with the library and there is not too many people use it for C++ development with wx.

    The "official supported IDE" for wx are: MSVC, CodeBlocks and (to some extent) CodeLite.

    It use to support Borland compiler (and IDE), but unfortunately there was a recent posts on the forum that recent version of Embarcadero broke the build of the library. This compiler is still supported though.

    Good luck! If you have any issues don't hesitate to update the question with any possible errors.