3

ALL,

I started my project on OSX 10.8 with the Xcode 5.1 (latest available for that OSX). Everything was building and running fine and it still is. The project consist of a binary executable and couple of dylib sub-projects.

Recently I bought myself a new Mac laptop. I installed Xcode on it (version 9), pull my sources from git hub and tried to re-compile/run it.

After fixing some minor directories issuers for compilation (some header search path were wrong), I received a warning about -L directory not found. However linking succeeded.

Trying to run the program obviously failed because the dylib files were not at the place were Xcode would look for it.

Looking further I tried to see if there would be any differences on where both machines store the build results. I opened the "Xcode->Project Properties..." menu, but turns out that those settings are the same on both laptops.

Next I checked the "Fie->Project Properties..." on both machines, but those 2 are also turns out to be the same.

Now I'm at the loss - where else should I look? The old laptop build everything without warnings and the program executes successfully.

On the old laptop the subprojects are stored inside ~///build/Debug.

On the new laptop the folder ~///build does not exist.

Now I can create the directory manually and copy over the files, but the program is still under development and the code is changing.

Any pointers would be appreciated.

TIA!

P.S.: Sorry for the long post.

1

Solving in somewhat unusual way:

a) You claim "However linking succeeded.", so in project properties pane, go to Products folder, then click on product name. On the right-side pane, under Identity and Type, you will find out the name of the product and the full path location. For one of my projects now i can find out:

~/Library/Developer/Xcode/DerivedData/prodname fnihcmsxnrxlstcumyviklyuofum/Build/Products/Debug/prodname

and a location attribute: Relative to Build Products - build folder was create by Xcode, you can find out "Build" also in Project Properties -> Build Settings -> Build Locations. (you can modify also according to your needs...)

b) Now for your missing library: also in Build Settings -> Linking you have the possibility to add your library at Prelink libraries, just click at the left of this item, two lines open below, Debug/Release, click on one line and a small + appears and add your library there.

EDIT: adding some pictures, as requested:

Selecting the Product:

enter image description here

Click on product name (rectangle on the picture) and the full path is to be found on the right pane as in this picture:

enter image description here

Now, in the first picture: click on application name icon, will open building info. Building path(s) are to be found as shown here:

enter image description here

And scrolling down further, the linking options as revealed here:

enter image description here

  • The last Xcode version is 10.1 – Yoan Dec 1 '18 at 17:02
  • could you please post a screenshot of how do I do it? Also it looks like you are doing it based on the default locations. And in my old laptop it appears I changed the location for all libraries I have in the worspace (sorry for using Windows terminology). But when I go and check it doesn't look this way. And therefore it didn't go to the new Mac. – Igor Dec 3 '18 at 0:25
  • sorry for the long delay, I just verified and weird as it is every single project (either binary or dylib) and the path are the same. Nevertheless, when I try to compile the project it says that the dylib is not found. And on the old machine compilation is working fine. I don not understand this at all. Is there anything else to check that might be different? Something that can be changed per project and is not transferred to a another machine? – Igor Dec 24 '18 at 5:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .