Reputation:
Any code that includes the libraries WxWidgets there is always an error in the library "setup.h", can you explain to me why?
in file included for c, 196
from c, 21
from c, 13
#error "This file should only be included when using Microsoft Visual C++"
wxCONCAT5(../../../lib/,wxCONCAT3(vc,, _lib), /,msw, /wx/setup.h): No such file or directory
293,
21,
13,
#error "wxUSE_DYNLIB_CLASS must be defined."
#error "wxUSE_EXCEPTIONS must be defined."
#error "wxUSE_FILESYSTEM must be defined."
#error "wxUSE_FS_ARCHIVE must be defined."
#error "wxUSE_DYNAMIC_LOADER must be defined."
#error "wxUSE_LOG must be defined."
#error "wxUSE_LONGLONG must be defined."
#error "wxUSE_MIMETYPE must be defined."
#error "wxUSE_PRINTF_POS_PARAMS must be defined."
#error "wxUSE_PROTOCOL must be defined."
#error "wxUSE_REGEX must be defined."
#error "wxUSE_STDPATHS must be defined."
#error "wxUSE_XML must be defined."
#error "wxUSE_SOCKETS must be defined."
#error "wxUSE_STREAMS must be defined."
#error "wxUSE_STOPWATCH must be defined."
#error "wxUSE_TEXTBUFFER must be defined."
#error "wxUSE_TEXTFILE must be defined."
#error "wxUSE_URL must be defined."
#error "wxUSE_VARIANT must be defined."
#error "wxUSE_ABOUTDLG must be defined."
#error "wxUSE_ACCEL must be defined."
#error "wxUSE_ANIMATIONCTRL must be defined."
#error "wxUSE_BITMAPCOMBOBOX must be defined."
#error "wxUSE_BMPBUTTON must be defined."
#error "wxUSE_BUTTON must be defined."
#error "wxUSE_CALENDARCTRL must be defined."
#error "wxMessageBox is always needed"
OnAbout(wxCommandEvent&)':
'wxMessageBox' was not declared in this scope
I have WxWidgets 2.8.12 with ide Falcon C++.
Upvotes: 0
Views: 2244
Reputation: 22753
You have somehow got $(WXWIN)\include\msvc
in your include path. This path is, of course, MSVC-specific and shouldn't be used at all when using g++, just as the error message tells you.
As another reply said, your best bet is to follow the instructions in the wiki. But in no case should you have the above path in your compiler options.
Upvotes: 1
Reputation: 6645
Your IDE is using GCC (possibly MINGW toolchain) as the compiler, while the WxWidgets library you have was built for Visual Studio compilers. Follow the instructions on their wiki on "Compiling wxWidgets with MinGW" to create a version compatible with GCC C++ toolchain. Alternatively, you could use one of the Visual Studio express editions as your IDE.
Upvotes: 1