views:

362

answers:

2

Xcode compiles my iPhone app for Debug fine and the application works fine on my iPhone. But when I compile for Distribution I get the following Linking error:

/Users/jtesta/Documents/WaterTaxi_prod_v1.1/build/WaterTaxi.app/WaterTaxi
ld: file not found: 
collect2: ld returned 1 exit status

It's not clear to me what file is not found. It almost looks like it can't find the executable in the application bundle. Any ideas what could be causing this?

A: 

I'm having a similar problem and would appreciate any help for this.

adjwilli
I was able to fix this but I can't remember exactly what the solution was. I think the problem that I had was that I was missing some libraries and once I added them everything was fine.
James Testa
+1  A: 

Some ideas which maybe you already tried?

  • Do a clean rebuild of absolutely everything
  • Make sure you have the proper provision profiles setup on your computer and on the iPhone

Did you try searching stack overflow for this error? I got the following hit...

http://stackoverflow.com/questions/1485239/qtcreator-build-returns-collect2-ld-returned-exit-status-1

There is also some discussion about this issue here...

http://cboard.cprogramming.com/cplusplus-programming/96529-error-collect2-ld-returned-1-exit-status.html

Rob Segal