Welcome to MacForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Per-target names for Xcode stlib project

 
   Macintosh computer (Home) -> General Discussion RSS
Related Topics:
API to create XCode project ? - Hi, is there an API to create a XCode project ? I need a way to hold my makefile based project in sync with XCode. Or is there another way to create a XCode project out of a makefile ? Thanks, Lothar

Xcode - does it replace Project Builder?? - Does replace current Project Builder? They never mentioned the words or for that matter in the WWDC keynote / demo. And looking at the Xcode site pages: ....the page..

XCode and automatically open last project ? - Hi, how set I up XCode to do that ? Thanks, Lothar

Xcode Problems - Hi all. I've just installed Xcode and started a little project. I want to write a little shell program that will use socket and curses. I create a new tool (I am using C). For using sockets there are no problems (standard include works quite fine, but..

Xcode & Tiger - Hello, I'm going to buy an iMac G5 and I'd like to begin to program with Xcode. I know that there are severals Xcode books on the market but I wonder if Tiger will deeply change Xcode and so if thoses books would be obsoletes ? What's the..
Next:  CoreData with multiple NIBs  
Author Message
Steven Fisher

External


Since: Aug 31, 2003
Posts: 1256



(Msg. 1) Posted: Mon Apr 09, 2007 5:02 pm
Post subject: Per-target names for Xcode stlib project
Archived from groups: comp>sys>mac>programmer>misc (more info?)

How can I control the name of the output file of a static library
project on a per-configuration basis? I'm using Xcode 2.4.1.

I know the usual way is to use the same name in per-configuration
folders, but I am supposed to put everything in a single folder and use
a _d suffix on debug executables. If it can't be done, fine, but I'd
like to make sure it can't be done before I say that. :)

 >> Stay informed about: Per-target names for Xcode stlib project 
Back to top
Login to vote
Sherm Pendley

External


Since: Jul 09, 2004
Posts: 149



(Msg. 2) Posted: Mon Apr 09, 2007 6:47 pm
Post subject: Re: Per-target names for Xcode stlib project [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Steven Fisher <sdfisher DeleteThis @spamcop.net> writes:

> How can I control the name of the output file of a static library
> project on a per-configuration basis? I'm using Xcode 2.4.1.
>
> I know the usual way is to use the same name in per-configuration
> folders, but I am supposed to put everything in a single folder and use
> a _d suffix on debug executables.

That's called a "Build Variant". Get info on your target, and choose the
"build" pane. In the "Build Options" collection you'll find the "Build
Variants" entry. Whatever you enter there (aside from "normal") will be
appended to your library name. So entering "d" will give you a library
named libfoo_d.dylib.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

 >> Stay informed about: Per-target names for Xcode stlib project 
Back to top
Login to vote
Steven Fisher

External


Since: Aug 31, 2003
Posts: 1256



(Msg. 3) Posted: Mon Apr 09, 2007 8:43 pm
Post subject: Re: Per-target names for Xcode stlib project [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <131le1tdg71ca3b DeleteThis @corp.supernews.com>,
SM Ryan <wyrmwif DeleteThis @tango-sierra-oscar-foxtrot-tango.fake.org> wrote:

> I'm not sure, but perhaps in the Project Info >> Build, add
> a new variable, say librarysuffix, and give it different values
> like "_d" or "" in different configurations. Then in the target
> Info >> Build >> Product Name, use the variable in the value,
> such as stlib$(librarysuffix). I haven't done this specifically,
> so I'm not sure if it will work.

Yes! This is immensely helpful. Thank you. :)
 >> Stay informed about: Per-target names for Xcode stlib project 
Back to top
Login to vote
SM Ryan1

External


Since: Jul 06, 2004
Posts: 9



(Msg. 4) Posted: Mon Apr 09, 2007 10:03 pm
Post subject: Re: Per-target names for Xcode stlib project [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Steven Fisher <sdfisher.RemoveThis@spamcop.net> wrote:
# How can I control the name of the output file of a static library
# project on a per-configuration basis? I'm using Xcode 2.4.1.
#
# I know the usual way is to use the same name in per-configuration
# folders, but I am supposed to put everything in a single folder and use
# a _d suffix on debug executables. If it can't be done, fine, but I'd
# like to make sure it can't be done before I say that. :)

I'm not sure, but perhaps in the Project Info >> Build, add
a new variable, say librarysuffix, and give it different values
like "_d" or "" in different configurations. Then in the target
Info >> Build >> Product Name, use the variable in the value,
such as stlib$(librarysuffix). I haven't done this specifically,
so I'm not sure if it will work.

You can also add a script phase and refer to $librarysuffix, such as
cp libsomething.a libsomething$librarysuffix.a

--
SM Ryan http://www.rawbw.com/~wyrmwif/
Don't say anything. Especially you.
 >> Stay informed about: Per-target names for Xcode stlib project 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> General Discussion All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]