Today's trunk, built correctly for Cocoa wxOSX/on OS X Yosemite using DialogBlocks. Other builds with DialogBlocks were always error-free and applications compiled with no problems.
But compiling my application produces an error message:
/wxWidgets/include/wx/strvararg.h:27:18 fatal error: 'tr1/type_traits' file not found. this was invoked from string.h:37
Evidently there is an incorrect #define, but where and which #defines are needed for OSX?
Same problem with 3.0.2.
No problems with MSW or GTK.
fatal error with trunk built on OS X
-
- Super wx Problem Solver
- Posts: 430
- Joined: Fri Oct 27, 2006 4:35 pm
- Location: Paris, France
- Contact:
Re: fatal error with trunk built on OS X
The problem went away with
#undef HAVE_TYPE_TRAITS
#undef HAVE_TR1_TYPE_TRAITS
before #if defined(HAVE_TYPE_TRAITS)
However, since I have no idea what undefining these value implies, care must be taken...
#undef HAVE_TYPE_TRAITS
#undef HAVE_TR1_TYPE_TRAITS
before #if defined(HAVE_TYPE_TRAITS)
However, since I have no idea what undefining these value implies, care must be taken...
Re: fatal error with trunk built on OS X
I've the same error on Mac OS X Yosemite, with the "stable" 3.0.2 but I can't find the options HAVE_TYPE_TRAITS in setup.h.
It's various days that I try to use wxWidgets 3.0.2 on Mac OS X Yosemite and it is really a pain: the library itself compiles without errors but when you try to create your own library or application, nothing works. I've try xCode, CodeLite and Eclipse. I've compiled the library with xCode (it works, but a little patch of WebKit) and compiles minimal but my code that compile and links well on Windows doesn't compile on Mac OS X, nor with xCode or eclipse.
Tested finally on eclipse, compiled the library from console: ok, it compile but still my library in eclipse doesn't, with the reported error:
This is the exploded command (i use wx-config in g++ parameters in eclipse):
Here's what wx-config reports from console, in my build-release folder:
Maybe my configure options are wrong? Here's it:
Note the "MacOSX10.10.sdk" stuff, there is not .7 SDK in my xCode version (6.4).
A tutorial on how to setup your own project to compile and link properly with the library would be very useful.
I use:
OS X Yosemite 10.10.5
iMac 21.5" end 2010
Intel Core i3 3.06 GHz
Eclipse CDT Mars
xCode Version 6.4 (6E35b)
wxWidgets 3.0.2 (stable release from .tar.bz2)
It's various days that I try to use wxWidgets 3.0.2 on Mac OS X Yosemite and it is really a pain: the library itself compiles without errors but when you try to create your own library or application, nothing works. I've try xCode, CodeLite and Eclipse. I've compiled the library with xCode (it works, but a little patch of WebKit) and compiles minimal but my code that compile and links well on Windows doesn't compile on Mac OS X, nor with xCode or eclipse.
Tested finally on eclipse, compiled the library from console: ok, it compile but still my library in eclipse doesn't, with the reported error:
Code: Select all
Description Resource Path Location Type
fatal error: 'tr1/type_traits' file not found lwxBase line 30, external location: /Users/stefano/Development/wxWidgets/include/wx/strvararg.h C/C++ Problem
Code: Select all
g++ -I..//Users/stefano/Development/wxWidgets/include/ -O3 -Wall -c -fmessage-length=0 `/Users/stefano/Development/wxWidgets/build-release/wx-config --cxxflags` -MMD -MP -MF"lwxBase/clsMDIChildFrame.d" -MT"lwxBase/clsMDIChildFrame.d" -o "lwxBase/clsMDIChildFrame.o" "/Users/stefano/Documents/A/LIGS/LWX/lwxLibraries/lwxBase/clsMDIChildFrame.cpp"
Code: Select all
MAC:build-release stefano$ ./wx-config --cxxflags
-I/Users/stefano/Development/wxWidgets/build-release/lib/wx/include/osx_cocoa-unicode-static-3.0 -I/Users/stefano/Development/wxWidgets/include -D_FILE_OFFSET_BITS=64 -DwxDEBUG_LEVEL=0 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__
Code: Select all
../configure --with-osx_cocoa --with-macosx-version-min=10.7 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk --prefix="$(pwd)" --with-opengl --disable-debug --disable-shared --enable-unicode --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin
A tutorial on how to setup your own project to compile and link properly with the library would be very useful.
I use:
OS X Yosemite 10.10.5
iMac 21.5" end 2010
Intel Core i3 3.06 GHz
Eclipse CDT Mars
xCode Version 6.4 (6E35b)
wxWidgets 3.0.2 (stable release from .tar.bz2)
Re: fatal error with trunk built on OS X [SOLVED]
Because the library compiles fine, I've checked the command line parameters of the wxWidgets library build between my sources build. To make it works, I should have to add this command-line parameters:
In eclipse: project properties -> GCC C++ compiler -> Miscellaneous -> Other flags
The full SDK path should be replaced with a variable but I'm enough happy this way!
Code: Select all
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7
The full SDK path should be replaced with a variable but I'm enough happy this way!

Re: fatal error with trunk built on OS X
I ran into this problem building on El-Capitan.
The root cause of the issue is using a mix of libc++ and libstdc++. The new version is libc++ which is used when you compile with 10.9 or higher. You can explicitly specify libc++ when configuring wxwidgets by using the following when configuring.
However as I found out this may not solve your entire problem. You also need to set the min version within XCode on all of your products and libraries to be 10.9 or higher and set the CFLAGS for those compiles to use the new library. If you have the min version set to something below 10.9 it will compile with the earlier lib and give errors.
Brad
The root cause of the issue is using a mix of libc++ and libstdc++. The new version is libc++ which is used when you compile with 10.9 or higher. You can explicitly specify libc++ when configuring wxwidgets by using the following when configuring.
Code: Select all
CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS="-stdlib=libc++"
Brad
BeerSmith.com