Xcode4: Linker Error: Directory not found for option

I get this error for my profile build (debug built in order).

{Directory not found for option '-L../../../Mac/Profile/lib [full path of that directory] Library not found for -lMyLib} 

When I check the path, the directory exists and the libmy libmy.bb file also exists. My library build path for the profile includes the $ (SRCROOT) /../../../ Mac / Profile / lib directory. I also made sure that the library was built in the profile settings.

This only happens when building a profile.

I would really like to have some help, although this may not be an easy question.

Thank!

EDIT: I found a solution myself. I solved the problem: there were two entries in the directory on my linker path. The second was surrounded by double quotes, and the first was not. Xcode4 seems to have combined them into a single directory entry, and apparently it was garbage. After removing the quotes, the linker error disappeared.

+45
linker build xcode4 macos
Jan 18 2018-12-18T00:
source share
4 answers

Go to the "Get Information" section on the target. Go to the "Build Settings" tab (I use Xcode4) and scroll down to "Search Paths", where you delete all the values ​​in the "Library Search Paths".

Hope this helps ...

+103
Feb 10 2018-12-12T00:
source share

There are two mistakes that people seem to confuse.

If this "directory is not found for the option" -L / ... "This means that this is a library error, and you can try:

  • Click on your project (goals)
  • Click Build Settings
  • In the Library Search Paths section, delete the paths

If this is a “directory not found for the option“ -F / ... ”, this means that it is a Framework error, and you can try:

  • Click on your project (goals)
  • Click Build Settings
  • In Framework Search Paths remove paths

This can happen when you move file links or change the name of a project folder.

+56
Sep 04 '13 at 15:41
source share

It was similar, as indicated above in the library search paths. I found that one of my paths was missing quotes around it ...

 // Old path $(PROJECT_DIR)/Google Analytics // New path "$(PROJECT_DIR)/Google Analytics" 
+1
Jan 29 '15 at
source share

I ran into this error, apparently with a completely different scenario from these answers above. Hopefully some people will do what I did and find it useful, even if this is a rare occurrence.

I managed to get this error by simply adding a new viewController to my project. As usual, I added a tableview and limited it, and then added and linked the delegate and the data source. I also created a property.

The strange thing I noticed then was that as soon as I finished creating the property, it was immediately connected, as if I had connected it, but before I connected it. When I clicked on the xib file and checked the links, it was not actually associated with the table view.

enter image description here

(This link appeared automatically, without the need to create it yourself)

I do not know why this happened. I deleted the file and redid it with the same name, but it happened again. Give me this error above.

The way I decided was to create a new file, a different name and add and create links in a different order, checking at each step that this did not happen. After that, nothing connected was created, and it worked.

TL DR: If you get this error and recently added a new view controller, check to see if this removes the action, and if so, they will be careful about any automatic links.

0
Nov 07 '14 at 3:37
source share



All Articles