I was having trouble getting my Xcode project to build. After some researching, I realised that I hadn't added the library I was referencing to my project.
If I add the library like this via Xcode, then the project builds successfully:
Click on your project in the upper left of the left pane (the blue icon).
In the middle pane, click on the Build Phases tab.
Under "Link Binary With Libraries", click on the plus button.
Click "Add Other..." (this is a 3rd party library)
Choose the filename (libVinylTrack.a) from my project's Source folder.
The issue is, of course, that I need to add this configuration via Introducer rather than the Xcode GUI - else my settings could be overwritten later.
The place to do this seems to be in Config > XCode (MacOSX) > Debug > External libraries to link. However, I'm not sure what I'm supposed to enter here.
To clarify, the library I want to link is <project folder>/Source/libVinylTrack.a
This does not seem to work for me, I see the library in the other linker flags in xcode but I get this error when building
library not found for -llibgmp
If I do the normal way of going to the Build Phases tab and "Link Binary With Libraries". I can build successfully. But the problem is introJucer keeps overwriting the project. Which is annoying, Is there a way to tell introJucer to stop doing this?
Yeah I changed the -L flag to the correct path, I even tried just the -l flag and put the full path of the library. The paths show up in Xcode. So I think it might be an Xcode bug.
Yeah mine is .a file , I can add fine if go to the build phases then Link with binary libaries Is there way to tell introJucer to do that instead, Cause it keeps overwriting. What was your solution?
AFAIK there’s currently no way to tell The Introjucer to do that.
You could set the library with Xcode, and then observe the commands generated by Xcode during the build process. That’s what i do sometimes in order to find the compile options needed when there’s no more fun at the “trial and error” party.