10.7 sdk and Symbol not found: _wcsdup

192 views
Skip to first unread message

teemo10

unread,
Aug 1, 2012, 3:29:20 AM8/1/12
to wx-u...@googlegroups.com
I recently built my apps using Xcode 4.4 against the 10.7 sdk, setting the deployment target to 10.6, using wx 2.9.5. When attempting to run my apps on 10.6 I get the following run-time error:

Dyld Error Message: Symbol not found: _wcsdup
Referenced from: /lib/Release/libwx_baseu-2.9.dylib
Expected in: /usr/lib/libSystem.B.dylib

How can I solve this?

Tamer El Nashar
VRSonic, Inc.

teemo10

unread,
Aug 2, 2012, 7:59:50 AM8/2/12
to wx-u...@googlegroups.com

I can confirm that building wxWidgets 10.9.5 against the 10.7 sdk on Lion, using the following command:

./configure CFLAGS="-arch i386" CXXFLAGS="-arch i386" LDFLAGS="-arch i386" OBJCFLAGS="-arch i386" OBJCXXFLAGS="-arch i386" --with-macosx-sdk="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" --with-macosx-version-min=10.6 --disable-compat28 --with-cocoa --with-opengl --prefix="$(pwd)" && make

Causes the above error when deploying on 10.6.8. I tested with the minimal sample.

 

 

Dion Whittaker

unread,
Aug 2, 2012, 10:15:01 AM8/2/12
to wx-u...@googlegroups.com
I had a similar issue compiling wxWidgets 2.9.4, against the 10.7 SDK and trying to run on 10.5, with macosx-version-min set to 10.5, except the library I had the undefined symbols in was libstdc++.6.dylib.

If you check the version information of libSystem.B.dylib on 10.7 you get:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

on 10.6 you get
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)

So the library has been updated from 10.6 to 10.7.
The only way I was able to fix the problem was to compile against the 10.5 SDK, so I suspect you will need to compile against the 10.6 SDK.

Hope this helps.
Dion



teemo10

unread,
Aug 5, 2012, 3:19:45 PM8/5/12
to wx-u...@googlegroups.com, dwhit...@cnsvs.com
I had a similar issue compiling wxWidgets 2.9.4, against the 10.7 SDK and trying to run on 10.5, with macosx-version-min set to 10.5, except the library I had the undefined symbols in was libstdc++.6.dylib.

If you check the version information of libSystem.B.dylib on 10.7 you get:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

on 10.6 you get
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)

So the library has been updated from 10.6 to 10.7.
The only way I was able to fix the problem was to compile against the 10.5 SDK, so I suspect you will need to compile against the 10.6 SDK.

Hope this helps.
Dion

I found I had to do this true. Unfortunately with Xcode 4.4 this is a bit of hack, since Xcode 4.4 removes the 10.6 sdk. So I had to download Xcode 4.3.3 and get the 10.6 sdk from it, and drop it in the right place in Xcode 4.4. However in the end reverting back to the 10.6 sdk did give me apps support for snow leopard 10.6.
Reply all
Reply to author
Forward
0 new messages