Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

daveywc

macrumors newbie
Original poster
Nov 4, 2011
5
0
I am using a 3rd party library from Chilkat for FTP in an iPad application targeting iOS 5. I have installed the library by copying the sources into my project, modifying my Header Search Paths and adding -all_load to my Other Linker Flags. The 3rd party library provides header files and 2 files named libchilkatIos.a (in separate folders) - one for device and one for simulator. These files both now appear under the Build Phases - Link Binary With Libraries section. My application runs fine on the device but whenever I try to build or run it on the simulator it comes up with the following warning and error:

ld: warning: ignoring file /Users/david/Development/Projects/DocsOnTap/Libraries/Chilkat-9.2.1-IOS-4.3/libDevice/libchilkatIos.a, missing required architecture i386 in file
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CkoFtp2", referenced from:
objc-class-ref in DataLoader.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have other 3rd party libraries in my project which work fine on both device and simulator. I'm not sure what to do to allow me to run on the simulator? (I did try removing the libchilkatIos.a file that was related to the device, however that did not help).

In the Chilkat installation instructions it seems to recommend having a different target for device and simulator, however I'm not sure how to do that - or whether that should be necessary.
 

daveywc

macrumors newbie
Original poster
Nov 4, 2011
5
0
Resolved

I resolved this by creating an additional target as suggested by Chilkat. I copied the existing target to make a new target for simulator use only. I then only had to make 2 changes to each target:

1. Ensure that the Library Search Path in Build Settings only included the appropriate folder.
2. Ensure that the correct file was referenced in Build Phases | Link Binary With Libraries section.

Other than that I also renamed the target, application and Info.plist files for the new target appropriately.
 

iwtech2011

macrumors newbie
Dec 5, 2011
1
0
Help on working with Chilkat Library

Hi,
I'm considering using Chilkat libraries on my ftp project. I read your post and I want to ask you to help me with some info because I have the same error. Can you please tell me which file I need to include in my .m file. I copied all the files in the include folder in my XCode project? I get the same error that you posted and I followed your instructions in your answer and still the error remains. Can you check the sample code at http://1afm.net/code/XcodeFtp.zip and see if you can help?. I was trying to include the library in the PutController.mm file. I was trying to implement the rename method.

Any help will be highly Appreciated.

Regards
Amy
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.