Re: Building For OS 10.1, 10.2, and 10.3
Re: Building For OS 10.1, 10.2, and 10.3
- Subject: Re: Building For OS 10.1, 10.2, and 10.3
- From: Glen Low <email@hidden>
- Date: Wed, 7 Jan 2004 04:26:06 +0800
Recently, I had a minor problem with this. My project uses
iODBC.framework
from OpenLink (located in /Library/Frameworks), and without
cross-compilation it was enough. However, after I changed the SDK to
10.2.8,
I also had to add two other OpenLink frameworks (iODBCadm.framework and
iODBCinst.framework) to the project, or linking gave the following
errors:
ld: warning can't open dynamic library:
/Developer/SDKs/MacOSX10.2.8.sdk/Library/Frameworks/
iODBCadm.framework/Versi
ons/3.51/iODBCadm (checking for undefined symbols may be affected) (No
such
file or directory, errno = 2)
ld: warning can't open dynamic library:
/Developer/SDKs/MacOSX10.2.8.sdk/Library/Frameworks/
iODBCinst.framework/Vers
ions/3.51/iODBCinst (checking for undefined symbols may be affected)
(No
such file or directory, errno = 2)
ld: Undefined symbols:
_SQLGetConfigMode referenced from iODBC expected to be defined in
/Library/Frameworks/iODBCinst.framework/Versions/3.51/iODBCinst
_SQLGetPrivateProfileString referenced from iODBC expected to be
defined in
/Library/Frameworks/iODBCinst.framework/Versions/3.51/iODBCinst
_SQLSetConfigMode referenced from iODBC expected to be defined in
/Library/Frameworks/iODBCinst.framework/Versions/3.51/iODBCinst
_iodbcdm_drvconn_dialbox referenced from iODBC expected to be defined
in
/Library/Frameworks/iODBCadm.framework/Versions/3.51/iODBCadm
_iodbcdm_drvconn_dialboxw referenced from iODBC expected to be defined
in
/Library/Frameworks/iODBCadm.framework/Versions/3.51/iODBCadm
Actually your problem finally rang a bell, the loader cannot find the
dylib to link against because it was indirectly referenced by the app.
Try tacking this on in Other Linker Flags:
-dylib_file A:B
where A is the path where ld was searching (in this case the SDKROOT
prepended path) and B is the path to the actual, real dylib you're
linking against.
The (minor) advantage over linking directly to the other dylibs is that
their paths are not encoded in the final executable, as you can see by
doing a otool -L on it.
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.