Nurdin
Nurdin

Reputation: 23883

IBM Worklight 6.1 - Error during compilation in Xcode: "linker command failed with exit code 1"

I'm using worklight for my mobile app project.

When I try to build my project I get this error in Xcode 5:

ld: warning: directory not found for option '-L"/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WorklightSDK"' ld: library not found for -lWorklightStaticLibProject clang: error: linker command failed with exit code 1 (use -v to see invocation)

Why does this happen?

Upvotes: 0

Views: 573

Answers (2)

Nurdin
Nurdin

Reputation: 23883

I got the answer.

My xcode project requires several frameworks to build successfully. I'm currently using scandit barcode scanner phonegap plugin.

These are several of frameworks to make it done.

  • AudioToolbox.framework
  • AVFoundation.framework
  • CoreGraphics.framework
  • CoreLocation.framework
  • CoreMedia.framework
  • CoreVideo.framework
  • QuartzCore.framework
  • SystemConfiguration.framework
  • libiconv.dylib
  • libz.dylib

Source: http://www.inno-swiss.com/post/view/24448/

Upvotes: 0

Idan Adar
Idan Adar

Reputation: 44516

Are you sure you have chosen Run As > Run on Worklight Server for your Worklight application in Eclipse?
If you think you have done everything right, edit the question with step-by-step reproduction of this error...

This error basically means that the application was not properly built, because it is missing an essential Worklight folder and library which are always re/added during build to the environment's native folder.

After building and deploying the application in Eclipse (the above mentioned action), you should then open it in Xcode.

You have two options:

  1. Copy the project's .zip file from the iphone\package folder, extract it and double-click the .xcodeproj file to open in Xcode and compile it.
  2. Navigate in the file system to the native folder and do the same from there.

The .zip is a replica of the generated Xcode project, while the native folder IS the Xcode project... (so be careful not to mess up your project).

If you are making any changes to this native folder post-build, like changing the project structure, don't...

Upvotes: 0

Related Questions