echonest / echoprint-ios-sample

Sample Echoprint song identifier for iOS
http://echoprint.me/
165 stars 53 forks source link

Problems with libechoprint-codegen-ios.a #5

Open wnurmi opened 12 years ago

wnurmi commented 12 years ago

Hi!

I am new to iPhone app development so please bear with me :)

After first compiling libechoprint-codegen-ios.a I got the following warning and error messages when trying to compile echoprint-ios-sample:

warning: ignoring file /Users/wnurmi/Documents/echoprint-ios-sample/libechoprint-codegen-ios.a, file was built for archive which is not the architecture being linked (i386) Undefined symbols for architecture i386: "Codegen::Codegen(float const*, unsigned int, int)", referenced from: codegen_wrapper(float const*, int) in Codegen_wrapper.o

After some googling, I managed to add the i386 architcture to the echopring-codegen-ios project settings, but this resulted in the following warning when compiling the echopring-codegen-ios project:

warning: no rule to process file '$(PROJECT_DIR)/echoprint-codegen-ios/../../AudioBufferInput.cxx' of type sourcecode.cpp.cpp for architecture i386

This warning is repeated for all eight .cxx files in the project and results in warnings and errors when trying to compile the echoprint-ios-sample:

warning: ignoring file /Users/wnurmi/Documents/echoprint-ios-sample/libechoprint-codegen-ios.a, missing required architecture i386 in file Undefined symbols for architecture i386: "Codegen::Codegen(float const*, unsigned int, int)", referenced from: codegen_wrapper(float const*, int) in Codegen_wrapper.o

I have googled for hours, but all advices are for java or .h files (that have been accidentially placed in Compile Sources build phase when they should be in Copy Heareds phase). But my problem is with .cxx files, and thus these advices have proved useless. Does anyone have any idea what is causing my problem or how I could add a build rule for the .cxx files for i386?

I have been trying to get this working the whole day. All help would be much appreciated!!

csotiriou commented 12 years ago

That happens because the newest Xcode does not produce a FAT library (for both the simulator and the device) when compiling anymore.

To solve the issue, just follow the guide here to produce a FAT library http://www.oramind.com/index.php/articles/159-ios-making-fat-static-libraries-simulator-device . I have also created unilib (also on my site at the linked location) just for these cases.