Re: How to eliminate a target's automatic framework search setting
Re: How to eliminate a target's automatic framework search setting
- Subject: Re: How to eliminate a target's automatic framework search setting
- From: Tron Thomas <email@hidden>
- Date: Mon, 28 Jun 2010 20:42:58 -0700
I have difficulty seeing why creating a mock framework will provide
anything over the original strategy which requires no framework in the
first place.
I would like to think that someone actually can eliminate the framework
search path for a target. However, you have said you don't believe that
can be done, and no one else has come out to contradict the notion.
This leaves me to suspect that the setting cannot be removed, and that
begs a very important question.
Why can't this framework setting be removed, especially when an Xcode
target will not use any frameworks at all?
It seems as if Xcode insists it knows better than a developer how all
the project targets should be configured. I believe many people could
find much flaw with that idea. Furthermore, although I have not tried,
I also believe someone could easily create a make file that would build
the test application just fine without having to jump any hoops like
relocating the build directory of the application, adding preprocessor
directives to use different headers depending on which target is
building a module, or anything else to get things to work properly.
If someone can build the application through a make file that require no
frame work search path, it serves as strong evidence that target does
not need the setting Xcode insists on it in the first place.
I think perhaps I might submit a bug report to Apple about this issue.
In the mean time, I believe I can find a way to hack around the
problem. Although, I suspect I will not be satisfied with any of the
things I do to fix it, especially when it seems to be so unnecessary.
On 06/28/2010 03:07 AM, Christiaan Hofman wrote:
On Jun 28, 2010, at 3:08, Tron Thomas wrote:
Okay here's what is going on:
I am using test driven development for the project. A certain module runs in an application that uses frameworks built in the project. This means the module has code to pull in header files from the frameworks.
This same module is also placed into a test application. To isolate the module the test application does not use the frameworks and instead provides a mock versions of things that would be used in the frameworks, and tries to provide its own version of the header files that would be available in the frameworks by configuring the search path for the test application to find different header files.
However, because Xcode insist on adding a framework search path for every target, regardless of whether that target actually uses any frameworks at all, the test application is pulling in the framework header files when it shouldn't.
I think a better way to do this is for the test app to have a mock version of the frameworks with the exact same headers, but perhaps non-working implementations when you don't need something. Then it doesn't matter where the compiler gets the headers from, it only matters where the runtime gets the framework. That's essentially what SDKs do, because the compiler generally just sees stub versions of the system frameworks. As for linking, I seem to recall you can set the particular path for specific frameworks to link to.
Now that I have explained the situation, how do I eliminate the framework search path from my test application?
That was already answered in my first reply: AFAICS you can't.
Christiaan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden