Re: Problem cross compiling for iPhone (iOS 4)

"Xander Maas (GMAIL)" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Daniel,

You saved my day! Thanks a lot!

And thanks for the sidenote.... I'll stick to one lib as I will be using that lib most probably.

Again thanks!

Regards,

Xander


On 16 feb 2011, at 13:40, Daniel Fazekas wrote:

> On Feb 16, 2011, at 07:31, Xander Maas wrote:
> 
>> This the Xcode project I am using. It should contain everything
> 
> Everything seems to be as expected.
> The copy of the FreeTDS libraries you included in BB Test/FreeTDS Lib were OK.
> 
> The build you had in BB Test/build/Debug-iphonesimulator/BB Test.app was wrong. So it wasn't linked with the library you had in "BB Test/FreeTDS Lib" but a different copy from somewhere else on your machine.
> 
> On my machine, free from those bad copies only you have, simply rebuilding the project was all I needed.
> 
> You have a bunch of unnecessary, bad library paths specified in the project:
> ld: warning: directory 'BB Test/../../../Desktop/freetds-0.83.dev.20110125/build/universal/lib' following -L not found
> ld: warning: directory 'BB Test/../FreeTDS/build/universal' following -L not found
> ld: warning: directory 'BB Test/../../../Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/lib' following -L not found
> ld: warning: directory 'BB Test/../FreeTDS/build/i686/lib' following -L not found
> ld: warning: directory 'BB Test/../FreeTDS/build/osx/lib' following -L not found
> 
> Looking at the command line Xcode uses to build it, the "BB Test/FreeTDS Lib" path is specified dead last.
> Only if none of the bogus paths that came before contains a file called libct.dyilb, libsybdb.dylib, libct.a, or ilbsybdb.a will it include the right copy from the proper place:
> 
> /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk \
> "-L/Users/Downloads/BB Test/build/Debug-iphonesimulator" \
> "-L{where_I_extracted_it}/BB Test/../../../Desktop/freetds-0.83.dev.20110125/build/universal/lib" \
> "-L{where_I_extracted_it}/BB Test/../FreeTDS/build/universal" \
> "-L{where_I_extracted_it}/BB Test/../../../Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/lib" \
> "-L{where_I_extracted_it}/BB Test/../FreeTDS/build/i686/lib" \
> "-L{where_I_extracted_it}/BB Test/../FreeTDS/build/osx/lib" \
> "-L{where_I_extracted_it}/BB Test/FreeTDS Lib" \
> … -lct -lsybdb …
> 
> You should go to
> Project → Edit Active Target “BB Test”   ⌥⌘E
> 
> pick
> Configuration: All Configurations
> Show: Settings Defined at This Level
> 
> Then edit the Search Paths / Library Search Paths setting so only the correct path remains.
> 
> One of the wrong paths must have a Mac OS X 10.6+ i386 build of the FreeTDS libs in it on your machine, which is where _fopen@UNIX2003 came from.
> 
> In an unrelated hint, it's unlikely you'll want to use both CTLib and DBLib at the same time. You just choose whichever API you prefer and stick to that.
> You seem to be using dblib, so the libct.a reference should be removed and only libsybdb.a left.
> 

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.