Xcode dependencies across different build directories?

前端 未结 5 1228
我在风中等你
我在风中等你 2021-01-19 08:28

I am trying to set up Xcode for a project which contains multiple executables and static libraries. I have created multiple targets and set up the linking and dependencies,

5条回答
  •  我在风中等你
    2021-01-19 09:01

    OK, it would help to have the text of the Linking... build line that's failing. But a couple of things:

    1) You shouldn't be linking to anything in $(SRCROOT). That's your project sources. The two places to find things to link are $(SYMROOT) (the Build Products directory) or $(DSTROOT) (the Installed Products directory).

    One thing you could do is to have a common Build Directory, then use 'xcodebuild install' action to install the products in the Installation Directory. The other is to use a Copy Files build phase to copy them after building, so you can link against them in $(SYMROOT) but still have them where your Windows compatriots expect them.

    THere is probably a way to set up the per-target build products directories correctly, but I'd really have to see the project itself to figure it out.

提交回复
热议问题