Latest Version of setup.h?

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
-LeetGamer-
In need of some credit
In need of some credit
Posts: 2
Joined: Tue Aug 02, 2011 4:06 am

Latest Version of setup.h?

Post by -LeetGamer- » Tue Aug 02, 2011 4:35 am

I tried compiling with CodeBlocks and I got an error saying "wx/setup.h cannot be found." So I googled "wx/setup.h" and got this: http://svn.wxwidgets.org/viewvc/wx/wxWi ... 90&view=co . I tried recompiling and got some more errors on some define lines. It said to read the top of the file and I read this:
Top of File wrote: /*
**************************************************
PLEASE READ THIS IF YOU GET AN ERROR IN THIS FILE!
**************************************************

If you get an error saying "wxUSE_FOO must be defined", it means that you
are not using the correct up-to-date version of setup.h. This happens most
often when using svn or daily snapshots and a new symbol was added to
setup0.h and you haven't updated your local setup.h to reflect it. If
this is the case, you need to propagate the changes from setup0.h to your
setup.h and, if using makefiles under MSW, also remove setup.h under the
build directory (lib/$(COMPILER)_{lib,dll}/msw[d][dll]/wx) so that
the new setup.h is copied there.

If you get an error of the form "wxFoo requires wxBar", then the settings
in your setup.h are inconsistent. You have the choice between correcting
them manually or commenting out #define wxABORT_ON_CONFIG_ERROR below to
try to correct the problems automatically (not really recommended but
might work).
*/


As you can see, it says I don't have the newest version of setup.h. So, with all this said, what's the latest version of setup.h?

User avatar
doublemax
Moderator
Moderator
Posts: 14770
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Latest Version of setup.h?

Post by doublemax » Tue Aug 02, 2011 8:00 am

You should use the setup.h that came with the source codes you got.

Which platform/wxWidgets version are you using?

This might help:
http://wiki.wxwidgets.org/Guides_%26_Tu ... p_Your_IDE
Use the source, Luke!

-LeetGamer-
In need of some credit
In need of some credit
Posts: 2
Joined: Tue Aug 02, 2011 4:06 am

Re: Latest Version of setup.h?

Post by -LeetGamer- » Tue Aug 02, 2011 9:57 am

doublemax wrote:You should use the setup.h that came with the source codes you got.

Which platform/wxWidgets version are you using?

This might help:
http://wiki.wxwidgets.org/Guides_%26_Tu ... p_Your_IDE
I'm using 2.9.2, and there was no setup.h in the include/wx folder.

User avatar
doublemax
Moderator
Moderator
Posts: 14770
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Latest Version of setup.h?

Post by doublemax » Tue Aug 02, 2011 10:38 am

I'm using 2.9.2, and there was no setup.h in the include/wx folder.
That's correct and that's why i asked what platform you were using.

E.g. on Linux it will be created while running "configure".
If you're on Windows, please read <wx>/docs/msw/install.txt and find the section for your ide/compiler.
Use the source, Luke!

User avatar
ColleenKobe
Experienced Solver
Experienced Solver
Posts: 88
Joined: Mon Aug 31, 2015 3:47 pm

Re: Latest Version of setup.h?

Post by ColleenKobe » Thu Apr 12, 2018 6:35 pm

Hi, doublemax,

I know this is a 12-year-old question, but I am having the same problem today.

My situation is this:
I am working in Windows 10.
I have a CodeLite workspace containing a C++ wxwidgets main program and a C-language dll.
The C dll needs to call some of the C++ procedures, so I'm writing a Wrapper dll per https://stackoverflow.com/questions/435 ... with-a-c-c.
I'm following the directions in the final post, from yzt.

I created a new project in the CodeLite workspace called Wrapper_Code. Wrapper.cpp is the only file in its project.

Here is my Wrapper.h file:

Code: Select all

#ifndef WRAPPER_H
#define WRAPPER_H

// Make sure functions are exported with C linkage under C++ compilers.
#ifdef __cplusplus
extern "C"
{                                       // Export the code below with C linkage.
#endif                                  // Close this block below.

#include "datatypes.h"                  //  2

void*   Settings_Class_create   ();

void    Settings_Class_release  (void* Settings_Class);

void    Settings_Class_sendCommandToSerialDevice
           (void*   Settings_Class,
            int     cmd,
            int     params,
            int     id);

#ifdef __cplusplus
}               // Export the following code with C linkage.
#endif

#endif // WRAPPER_H
Here is my Wrapper.cpp file:

Code: Select all

#include "Settings_Class.h"             //  5

// Wrapper code.

//  Creates an instance of the C++ class Settings_Class.  Do this first in the C file.

/*extern "C"*/ void* Settings_Class_create ()
{
    return new Settings_Class;
}   // Settings_Class_create

// -----------------------------------------------------------------------------
//  Destroys an instance of the C++ class Settings_Class.  Do this last in the C file.

/*extern "C"*/ void Settings_Class_release (void* Settings_Class)
{
    delete static_cast<Settings_Class*> (Settings_Class);
}   // Settings_Class_release

// -----------------------------------------------------------------------------
//  This procedure invokes the C++ procedure, and passes along the arguments to the C++ side.

/*extern "C"*/ void Settings_Class_sendCommandToSerialDevice
           (void* Settings_Class,
            int cmd,
            int params,
            int id)

{

    static_cast<Settings_Class*> (Settings_Class)->sendCommandToSerialDevice (cmd,params,id);

}   // Settings_Class_sendCommandToSerialDevice
Settings_Class is the name of the C++ class containing the C++ procedures that the C procedure wants to call. Here is Settings_Class.h:
Settings_Class.h
Settings_Class.h
(7.58 KiB) Downloaded 31 times
When I went to compile and link, I got the following error messages.

Code: Select all

C:\WINDOWS\system32\cmd.exe /C C:/MinGW/bin/mingw32-make.exe -j 4 -e -f  Makefile
"----------Building project:[ Wrapper_Code - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'F:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code'
In file included from C:/wxWidgets/include/wx/platform.h:595:0,
                 from C:/wxWidgets/include/wx/defs.h:27,
                 from C:/wxWidgets/include/wx/string.h:24,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:27,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:20,
                 from Wrapper.cpp:1:
C:/wxWidgets/include/wx/chkconf.h:90:9: error: #error "wxUSE_ANY must be defined, please read comment near the top of this file."
 #       error "wxUSE_ANY must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:98:9: error: #error "wxUSE_COMPILER_TLS must be defined, please read comment near the top of this file."
 #       error "wxUSE_COMPILER_TLS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:106:9: error: #error "wxUSE_CONSOLE_EVENTLOOP must be defined, please read comment near the top of this file."
 #       error "wxUSE_CONSOLE_EVENTLOOP must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:114:9: error: #error "wxUSE_DYNLIB_CLASS must be defined, please read comment near the top of this file."
 #       error "wxUSE_DYNLIB_CLASS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:122:9: error: #error "wxUSE_EXCEPTIONS must be defined, please read comment near the top of this file."
 #       error "wxUSE_EXCEPTIONS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:130:9: error: #error "wxUSE_FILE_HISTORY must be defined, please read comment near the top of this file."
 #       error "wxUSE_FILE_HISTORY must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:138:9: error: #error "wxUSE_FILESYSTEM must be defined, please read comment near the top of this file."
 #       error "wxUSE_FILESYSTEM must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:146:9: error: #error "wxUSE_FS_ARCHIVE must be defined, please read comment near the top of this file."
 #       error "wxUSE_FS_ARCHIVE must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:154:9: error: #error "wxUSE_FSVOLUME must be defined, please read comment near the top of this file."
 #       error "wxUSE_FSVOLUME must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:162:9: error: #error "wxUSE_FSWATCHER must be defined, please read comment near the top of this file."
 #       error "wxUSE_FSWATCHER must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:170:9: error: #error "wxUSE_DYNAMIC_LOADER must be defined, please read comment near the top of this file."
 #       error "wxUSE_DYNAMIC_LOADER must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:178:9: error: #error "wxUSE_INTL must be defined, please read comment near the top of this file."
 #       error "wxUSE_INTL must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:186:9: error: #error "wxUSE_IPV6 must be defined, please read comment near the top of this file."
 #       error "wxUSE_IPV6 must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:194:9: error: #error "wxUSE_LOG must be defined, please read comment near the top of this file."
 #       error "wxUSE_LOG must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:202:9: error: #error "wxUSE_LONGLONG must be defined, please read comment near the top of this file."
 #       error "wxUSE_LONGLONG must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:210:9: error: #error "wxUSE_MIMETYPE must be defined, please read comment near the top of this file."
 #       error "wxUSE_MIMETYPE must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:218:9: error: #error "wxUSE_ON_FATAL_EXCEPTION must be defined, please read comment near the top of this file."
 #       error "wxUSE_ON_FATAL_EXCEPTION must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:226:9: error: #error "wxUSE_PRINTF_POS_PARAMS must be defined, please read comment near the top of this file."
 #       error "wxUSE_PRINTF_POS_PARAMS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:234:9: error: #error "wxUSE_PROTOCOL must be defined, please read comment near the top of this file."
 #       error "wxUSE_PROTOCOL must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:276:9: error: #error "wxUSE_REGEX must be defined, please read comment near the top of this file."
 #       error "wxUSE_REGEX must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:284:9: error: #error "wxUSE_STDPATHS must be defined, please read comment near the top of this file."
 #       error "wxUSE_STDPATHS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:292:9: error: #error "wxUSE_XML must be defined, please read comment near the top of this file."
 #       error "wxUSE_XML must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:300:9: error: #error "wxUSE_SOCKETS must be defined, please read comment near the top of this file."
 #       error "wxUSE_SOCKETS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:308:9: error: #error "wxUSE_STD_CONTAINERS must be defined, please read comment near the top of this file."
 #       error "wxUSE_STD_CONTAINERS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:316:9: error: #error "wxUSE_STD_STRING_CONV_IN_WXSTRING must be defined, please read comment near the top of this file."
 #       error "wxUSE_STD_STRING_CONV_IN_WXSTRING must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:324:9: error: #error "wxUSE_STREAMS must be defined, please read comment near the top of this file."
 #       error "wxUSE_STREAMS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:332:9: error: #error "wxUSE_STOPWATCH must be defined, please read comment near the top of this file."
 #       error "wxUSE_STOPWATCH must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:340:9: error: #error "wxUSE_TEXTBUFFER must be defined, please read comment near the top of this file."
 #       error "wxUSE_TEXTBUFFER must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:348:9: error: #error "wxUSE_TEXTFILE must be defined, please read comment near the top of this file."
 #       error "wxUSE_TEXTFILE must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:364:9: error: #error "wxUSE_URL must be defined, please read comment near the top of this file."
 #       error "wxUSE_URL must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:372:9: error: #error "wxUSE_VARIANT must be defined, please read comment near the top of this file."
 #       error "wxUSE_VARIANT must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:380:9: error: #error "wxUSE_XLOCALE must be defined, please read comment near the top of this file."
 #       error "wxUSE_XLOCALE must be defined, please read comment near the top of this file."
         ^
In file included from C:/wxWidgets/include/wx/chkconf.h:1224:0,
                 from C:/wxWidgets/include/wx/platform.h:595,
                 from C:/wxWidgets/include/wx/defs.h:27,
                 from C:/wxWidgets/include/wx/string.h:24,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:27,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:20,
                 from Wrapper.cpp:1:
C:/wxWidgets/include/wx/msw/chkconf.h:19:10: error: #error "wxUSE_ACTIVEX must be defined."
 #        error "wxUSE_ACTIVEX must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:27:9: error: #error "wxUSE_CRASHREPORT must be defined."
 #       error "wxUSE_CRASHREPORT must be defined."
         ^
C:/wxWidgets/include/wx/msw/chkconf.h:35:9: error: #error "wxUSE_DC_CACHEING must be defined"
 #       error "wxUSE_DC_CACHEING must be defined"
         ^
C:/wxWidgets/include/wx/msw/chkconf.h:43:10: error: #error "wxUSE_DIALUP_MANAGER must be defined."
 #        error "wxUSE_DIALUP_MANAGER must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:51:10: error: #error "wxUSE_MS_HTML_HELP must be defined."
 #        error "wxUSE_MS_HTML_HELP must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:59:10: error: #error "wxUSE_INICONF must be defined."
 #        error "wxUSE_INICONF must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:67:10: error: #error "wxUSE_OLE must be defined."
 #        error "wxUSE_OLE must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:75:10: error: #error "wxUSE_OLE_AUTOMATION must be defined."
 #        error "wxUSE_OLE_AUTOMATION must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:83:9: error: #error "wxUSE_TASKBARICON_BALLOONS must be defined."
 #       error "wxUSE_TASKBARICON_BALLOONS must be defined."
         ^
C:/wxWidgets/include/wx/msw/chkconf.h:91:10: error: #error "wxUSE_UNICODE_MSLU must be defined."
 #        error "wxUSE_UNICODE_MSLU must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:99:10: error: #error "wxUSE_UXTHEME must be defined."
 #        error "wxUSE_UXTHEME must be defined."
          ^
In file included from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\type_traits:35:0,
                 from C:/wxWidgets/include/wx/strvararg.h:25,
                 from C:/wxWidgets/include/wx/string.h:46,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:27,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:20,
                 from Wrapper.cpp:1:
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^
mingw32-make.exe[1]: *** [Debug/Wrapper.cpp.o.d] Error 1
Wrapper_Code.mk:103: recipe for target 'Debug/Wrapper.cpp.o.d' failed
mingw32-make.exe[1]: Leaving directory 'F:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target 'All' failed
====44 errors, 3 warnings====
I searched for reasons why I could get errors like this, and found your dozen-year-old post here. I followed your directions and searched in my C:\wxWidgets folder for all occurrences of setup.h. I had three in what looked like would be Windows folders:
  • C:\wxWidgets\include\wx\msw\setup.h
    C:\wxWidgets\lib\gcc_lib\mswu\wx\setup.h
    C:\wxWidgets\lib\gcc_lib\mswud\wx\setup.h
What was the difference between them? I compared the files to each other using Beyond Compare: they are identical. Here is a listing for one of them; sorry it's so long.
setup.h
setup.h
(56.77 KiB) Downloaded 43 times
Anyway, you can see in the setup.h listing that the compiler variables that the error messages complained were missing, are actually already defined. So that may mean that the setup.h files listed above aren't even being used.

What can I do to resolve those error messages? Suggestions?

Thanks.
Colleen

User avatar
doublemax
Moderator
Moderator
Posts: 14770
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Latest Version of setup.h?

Post by doublemax » Thu Apr 12, 2018 6:44 pm

What's the first wx header you include inside ut_gui.h? If it's not "wx/wx.h" try adding that.
Use the source, Luke!

User avatar
ColleenKobe
Experienced Solver
Experienced Solver
Posts: 88
Joined: Mon Aug 31, 2015 3:47 pm

Re: Latest Version of setup.h?

Post by ColleenKobe » Fri Apr 13, 2018 4:26 pm

Thank you for replying, doublemax.

The first wx header inside ut_gui.h used to be

#include <wx/string.h>

Now the wx files in the ut_gui.h file #include list are just these:

#include <wx/wx.h> // 5z
#include <wx/string.h> // 6

I also edited the wrapper procedures to do more what I need them to do, and also renamed them to align with what I needed.
Wrapper.h
Wrapper.h
(2.89 KiB) Downloaded 38 times
Wrapper.cpp
Wrapper.cpp
(9.54 KiB) Downloaded 39 times
And the file that invokes the wrapper procedures, P04.c, which compiles with 0 errors.
P04.c
P04.c
(8.9 KiB) Downloaded 48 times
But I am still getting error messages when I try to compile Wrapper.cpp. Here is the build log from my last compilation.

Code: Select all

C:\WINDOWS\system32\cmd.exe /C mingw32-make.exe -j 4 -e -f  Makefile
"----------Building project:[ Wrapper_Code - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'F:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code'
In file included from C:/wxWidgets/include/wx/platform.h:595:0,
                 from C:/wxWidgets/include/wx/defs.h:27,
                 from C:/wxWidgets/include/wx/wx.h:14,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:27,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:20,
                 from Wrapper.cpp:24:
C:/wxWidgets/include/wx/chkconf.h:90:9: error: #error "wxUSE_ANY must be defined, please read comment near the top of this file."
 #       error "wxUSE_ANY must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:98:9: error: #error "wxUSE_COMPILER_TLS must be defined, please read comment near the top of this file."
 #       error "wxUSE_COMPILER_TLS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:106:9: error: #error "wxUSE_CONSOLE_EVENTLOOP must be defined, please read comment near the top of this file."
 #       error "wxUSE_CONSOLE_EVENTLOOP must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:114:9: error: #error "wxUSE_DYNLIB_CLASS must be defined, please read comment near the top of this file."
 #       error "wxUSE_DYNLIB_CLASS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:122:9: error: #error "wxUSE_EXCEPTIONS must be defined, please read comment near the top of this file."
 #       error "wxUSE_EXCEPTIONS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:130:9: error: #error "wxUSE_FILE_HISTORY must be defined, please read comment near the top of this file."
 #       error "wxUSE_FILE_HISTORY must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:138:9: error: #error "wxUSE_FILESYSTEM must be defined, please read comment near the top of this file."
 #       error "wxUSE_FILESYSTEM must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:146:9: error: #error "wxUSE_FS_ARCHIVE must be defined, please read comment near the top of this file."
 #       error "wxUSE_FS_ARCHIVE must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:154:9: error: #error "wxUSE_FSVOLUME must be defined, please read comment near the top of this file."
 #       error "wxUSE_FSVOLUME must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:162:9: error: #error "wxUSE_FSWATCHER must be defined, please read comment near the top of this file."
 #       error "wxUSE_FSWATCHER must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:170:9: error: #error "wxUSE_DYNAMIC_LOADER must be defined, please read comment near the top of this file."
 #       error "wxUSE_DYNAMIC_LOADER must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:178:9: error: #error "wxUSE_INTL must be defined, please read comment near the top of this file."
 #       error "wxUSE_INTL must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:186:9: error: #error "wxUSE_IPV6 must be defined, please read comment near the top of this file."
 #       error "wxUSE_IPV6 must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:194:9: error: #error "wxUSE_LOG must be defined, please read comment near the top of this file."
 #       error "wxUSE_LOG must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:202:9: error: #error "wxUSE_LONGLONG must be defined, please read comment near the top of this file."
 #       error "wxUSE_LONGLONG must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:210:9: error: #error "wxUSE_MIMETYPE must be defined, please read comment near the top of this file."
 #       error "wxUSE_MIMETYPE must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:218:9: error: #error "wxUSE_ON_FATAL_EXCEPTION must be defined, please read comment near the top of this file."
 #       error "wxUSE_ON_FATAL_EXCEPTION must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:226:9: error: #error "wxUSE_PRINTF_POS_PARAMS must be defined, please read comment near the top of this file."
 #       error "wxUSE_PRINTF_POS_PARAMS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:234:9: error: #error "wxUSE_PROTOCOL must be defined, please read comment near the top of this file."
 #       error "wxUSE_PROTOCOL must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:276:9: error: #error "wxUSE_REGEX must be defined, please read comment near the top of this file."
 #       error "wxUSE_REGEX must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:284:9: error: #error "wxUSE_STDPATHS must be defined, please read comment near the top of this file."
 #       error "wxUSE_STDPATHS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:292:9: error: #error "wxUSE_XML must be defined, please read comment near the top of this file."
 #       error "wxUSE_XML must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:300:9: error: #error "wxUSE_SOCKETS must be defined, please read comment near the top of this file."
 #       error "wxUSE_SOCKETS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:308:9: error: #error "wxUSE_STD_CONTAINERS must be defined, please read comment near the top of this file."
 #       error "wxUSE_STD_CONTAINERS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:316:9: error: #error "wxUSE_STD_STRING_CONV_IN_WXSTRING must be defined, please read comment near the top of this file."
 #       error "wxUSE_STD_STRING_CONV_IN_WXSTRING must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:324:9: error: #error "wxUSE_STREAMS must be defined, please read comment near the top of this file."
 #       error "wxUSE_STREAMS must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:332:9: error: #error "wxUSE_STOPWATCH must be defined, please read comment near the top of this file."
 #       error "wxUSE_STOPWATCH must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:340:9: error: #error "wxUSE_TEXTBUFFER must be defined, please read comment near the top of this file."
 #       error "wxUSE_TEXTBUFFER must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:348:9: error: #error "wxUSE_TEXTFILE must be defined, please read comment near the top of this file."
 #       error "wxUSE_TEXTFILE must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:364:9: error: #error "wxUSE_URL must be defined, please read comment near the top of this file."
 #       error "wxUSE_URL must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:372:9: error: #error "wxUSE_VARIANT must be defined, please read comment near the top of this file."
 #       error "wxUSE_VARIANT must be defined, please read comment near the top of this file."
         ^
C:/wxWidgets/include/wx/chkconf.h:380:9: error: #error "wxUSE_XLOCALE must be defined, please read comment near the top of this file."
 #       error "wxUSE_XLOCALE must be defined, please read comment near the top of this file."
         ^
In file included from C:/wxWidgets/include/wx/chkconf.h:1224:0,
                 from C:/wxWidgets/include/wx/platform.h:595,
                 from C:/wxWidgets/include/wx/defs.h:27,
                 from C:/wxWidgets/include/wx/wx.h:14,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:27,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:20,
                 from Wrapper.cpp:24:
C:/wxWidgets/include/wx/msw/chkconf.h:19:10: error: #error "wxUSE_ACTIVEX must be defined."
 #        error "wxUSE_ACTIVEX must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:27:9: error: #error "wxUSE_CRASHREPORT must be defined."
 #       error "wxUSE_CRASHREPORT must be defined."
         ^
C:/wxWidgets/include/wx/msw/chkconf.h:35:9: error: #error "wxUSE_DC_CACHEING must be defined"
 #       error "wxUSE_DC_CACHEING must be defined"
         ^
C:/wxWidgets/include/wx/msw/chkconf.h:43:10: error: #error "wxUSE_DIALUP_MANAGER must be defined."
 #        error "wxUSE_DIALUP_MANAGER must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:51:10: error: #error "wxUSE_MS_HTML_HELP must be defined."
 #        error "wxUSE_MS_HTML_HELP must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:59:10: error: #error "wxUSE_INICONF must be defined."
 #        error "wxUSE_INICONF must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:67:10: error: #error "wxUSE_OLE must be defined."
 #        error "wxUSE_OLE must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:75:10: error: #error "wxUSE_OLE_AUTOMATION must be defined."
 #        error "wxUSE_OLE_AUTOMATION must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:83:9: error: #error "wxUSE_TASKBARICON_BALLOONS must be defined."
 #       error "wxUSE_TASKBARICON_BALLOONS must be defined."
         ^
C:/wxWidgets/include/wx/msw/chkconf.h:91:10: error: #error "wxUSE_UNICODE_MSLU must be defined."
 #        error "wxUSE_UNICODE_MSLU must be defined."
          ^
C:/wxWidgets/include/wx/msw/chkconf.h:99:10: error: #error "wxUSE_UXTHEME must be defined."
 #        error "wxUSE_UXTHEME must be defined."
          ^
In file included from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\type_traits:35:0,
                 from C:/wxWidgets/include/wx/strvararg.h:25,
                 from C:/wxWidgets/include/wx/string.h:46,
                 from C:/wxWidgets/include/wx/memory.h:15,
                 from C:/wxWidgets/include/wx/object.h:19,
                 from C:/wxWidgets/include/wx/wx.h:15,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/ut_gui.h:27,
                 from F:/Prototypes_wxw/SBIR_Phase_II/Main/Settings_Class.h:20,
                 from Wrapper.cpp:24:
c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^
mingw32-make.exe[1]: *** [Debug/Wrapper.cpp.o.d] Error 1
mingw32-make.exe: *** [All] Error 2
Wrapper_Code.mk:103: recipe for target 'Debug/Wrapper.cpp.o.d' failed
mingw32-make.exe[1]: Leaving directory 'F:/Prototypes_wxw/SBIR_Phase_II/Wrapper_Code'
Makefile:4: recipe for target 'All' failed
====44 errors, 3 warnings====
Ideas?

What if the error message about setup.h not being the latest-and-greatest is correct? I checked https://www.wxwidgets.org/downloads/, and I see "Latest Development Release: 3.1.1 / Released: February 19, 2018"

and

"Latest Stable Release: 3.0.4 / Released: March 8th, 2018 / API Stable Since: November 11th, 2013".

The timestamp on my files on my computer is July 10, 2017, which is earlier than 3.1.1 and 3.0.4. Do I need to re-download and re-compile wxWidgets? I'd prefer to avoid upgrading in the middle of a project, but I will if I have to.

Colleen

User avatar
doublemax
Moderator
Moderator
Posts: 14770
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Latest Version of setup.h?

Post by doublemax » Fri Apr 13, 2018 4:53 pm

What if the error message about setup.h not being the latest-and-greatest is correct?
That would only be an issue, if you get the error only for very few #defines. Here it seems that setup.h is not included at all.

Check "datatypes.h", that's the only file left that can be responsible.
Use the source, Luke!

User avatar
ColleenKobe
Experienced Solver
Experienced Solver
Posts: 88
Joined: Mon Aug 31, 2015 3:47 pm

Re: Latest Version of setup.h?

Post by ColleenKobe » Mon Apr 16, 2018 1:43 pm

Hi, doublemax,

This is datatypes.h:

Code: Select all

#ifndef DATATYPES_H
#define DATATYPES_H

// =============================================================================
//                            Set Up Compiler Options
// =============================================================================

/* Make sure functions are exported with C linkage under C++ compilers. */
#ifdef __cplusplus
extern "C"
{               // Export the following code with C linkage.
#endif          // Notice that this block is still open. It is closed below.

#define DllExport  __declspec (dllexport)
#define DllImport  __declspec (dllimport)
#define CALL_TYPE __stdcall

// =============================================================================
//                       External Header Files to Include
// =============================================================================

// None.


// =============================================================================
//    Constants Global Within This File, and Any File "#include"ing This File
// =============================================================================

// None.

// =============================================================================
//    Data Types Global Within This File, and Any File "#include"ing This File
// =============================================================================


                                                        //  -----------------------------------------------------
                                                        //                          Range
                                                        //  -----------------------------------------------------
typedef signed char         Int8;                       //  -2** 7..+(2** 7)-1  (           -128 ..           127)
typedef short               Int16;                      //  -2**15..+(2**15)-1  (        -32,768 ..        32,767)
typedef int                 Int32;  // AKA long         //  -2**31..+(2**31)-1  ( -2,147,483,648 .. 2,147,483,647)
//typedef long long           Int64;  // AKA LONGLONG     //  -2**63..+(2**63)-1  (you get the idea)

typedef unsigned char       UInt8;                      //  0.. 2** 8 ( 0 ..           256)
typedef unsigned short      UInt16;                     //  0.. 2**16 ( 0 ..        65,536)
typedef unsigned int        UInt32; // AKA DWORD        //  0.. 2**32 ( 0 .. 4,294,967,296)

typedef unsigned long long  UInt64; // AKA DWORDLONG    //  0.. 2**64 (you get the idea)
typedef double              Int64;  //                  //  floating point because unsigned long long didn't seem to work.


// =============================================================================
//     Prototypes for Public Procedures and Functions Residing in This File
//
//     Note: the procedures and functions are listed in alphabetical order.
//           It is the same sequence they appear in, in the ut.c file.
// =============================================================================

// None.

#ifdef __cplusplus
}               // export the following code with C linkage.
#endif

#endif // DATATYPES_H
Datatypes.h is just a collection of type definitions that I created. I had trouble in the past with using multiple compilers and IDEs in the same project, but the compilers and IDEs had different definitions for the length of a "word" (is it 16 bits, or 32?) and an "int" (32 bits, or 64?), and whether they were signed or unsigned. This file was my way of eliminating doubt.

Have I introduced a problem by having datatypes.h? It doesn't include any other file. What should I be looking for?

Colleen

User avatar
doublemax
Moderator
Moderator
Posts: 14770
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Latest Version of setup.h?

Post by doublemax » Mon Apr 16, 2018 3:44 pm

Honestly, i'm out of ideas.

Try to narrow it down by creating a minimal sample and add the suspicious header files one after another until the error shows up.
Use the source, Luke!

User avatar
ColleenKobe
Experienced Solver
Experienced Solver
Posts: 88
Joined: Mon Aug 31, 2015 3:47 pm

Re: Latest Version of setup.h?

Post by ColleenKobe » Mon Apr 16, 2018 4:10 pm

Thanks, doublemax. I'll do that. :-)

Colleen

User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: Latest Version of setup.h?

Post by eranon » Mon Apr 16, 2018 9:20 pm

Hello, Don't know if it's always the case, but I see this kind of error when using CodeLIte here: https://forums.codelite.org/viewtopic.php?f=20&t=3186. It's a thread from 2015, but it talks about fixed naming convention for wxWidgets-libs path (eg. gcc481TDM_dll instead of just gcc_dll); and a way going through wx-config.exe to get rid of this limitation. Well! this said, I don't use CodeLite, so I can't see if it's still relevant or not...
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 354
Joined: Fri Nov 03, 2006 2:00 pm

Re: Latest Version of setup.h?

Post by stahta01 » Tue Apr 17, 2018 1:27 am

eranon wrote:Hello, Don't know if it's always the case, but I see this kind of error when using CodeLIte here: https://forums.codelite.org/viewtopic.php?f=20&t=3186. It's a thread from 2015, but it talks about fixed naming convention for wxWidgets-libs path (eg. gcc481TDM_dll instead of just gcc_dll); and a way going through wx-config.exe to get rid of this limitation. Well! this said, I don't use CodeLite, so I can't see if it's still relevant or not...
The above normally only applies if you are downloading wxWidgets built binaries; should not apply using self-built binaries.
No idea where the posters binaries were built.
Edit: Or even whether the poster has binaries; I failed to see where he/she built wxWidgets or not.

Tim S.

Post Reply