|
|
weak link a name with spaces? (CW)
|
|
|
|
Fresh-Faced Recruit
Join Date: Jun 2006
Status:
Offline
|
|
I need to weak link a framework whose name has a space in it.
In CodeWarrior you can weak link with a .lcf file that includes the line:
-weak_framework TheFrameworkName
But now I've been sent a framework (third-party so I can't just rename it) that has a space in it. Namely: dcampi Library.
I've tried enclosing the name in both single and double quotes, but they are ignored and I always get an error about "Library" being an unknown command.
Does anyone know if this can be worked around?
Thanks,
John
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
I don't have CodeWarrior, but have you tried shell escaping (i.e., either "dcampi\ Library" or "dcampi\\ Library")?
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jun 2006
Status:
Offline
|
|
Originally Posted by Chuckit
I don't have CodeWarrior, but have you tried shell escaping (i.e., either "dcampi\ Library" or "dcampi\\ Library")?
Good suggestion, I hadn't thought of that, but it didn't work.
I also tried escaping the quotes around the name, but no joy.
I also tried dcamapi\0x20Library, but it just took it literally and said it couldn't find dcamapi\0x20Library.
Hmmm, I don't see any other framework on my system with a space in the name. I think it may have to be renamed. The developer sent me an XCode sample project, but I get an error in the console opening it ("Failed to load file", gee thanks). So I can't see what they are doing there.
Oh well, back at it tomorrow. Thanks again.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status:
Offline
|
|
Okay... your original post is about 10% ambiguous... you're using CodeWarrior, right? Why not Xcode?
|
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jun 2006
Status:
Offline
|
|
Originally Posted by Detrius
Okay... your original post is about 10% ambiguous... you're using CodeWarrior, right? Why not Xcode?
Well, because I'm using CodeWarrior. I've got over 40 projects to move to XCode, and right now this one's still in CW.
But, if I _were_ using XCode, how would I mark an entire framework to be weak linked? I've searched the XCode 2.2.1 help and not found anything that matches this CW option. But I'm probably just not familiar enough with XCode. Where should I look for this?
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status:
Offline
|
|
Originally Posted by JMacV8
Well, because I'm using CodeWarrior. I've got over 40 projects to move to XCode, and right now this one's still in CW.
But, if I _were_ using XCode, how would I mark an entire framework to be weak linked? I've searched the XCode 2.2.1 help and not found anything that matches this CW option. But I'm probably just not familiar enough with XCode. Where should I look for this?
It's in the gcc man page. In your LDFLAGS, you would put something along these lines:
-weak_framework dcampi\ Library
You can also link individual functions weakly, though I don't have the info readily available.
Also, I find this excessively handy for doing research on gcc:
alias pman "man -t \!:* | open -f -a Preview"
It opens the man page as a postscript document in preview. Then, you can take advantage of the search capabilities of Preview to find features you need, which is pretty important, since the gcc man page is freaking huge.
|
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jun 2006
Status:
Offline
|
|
Originally Posted by Detrius
It's in the gcc man page. In your LDFLAGS, you would put something along these lines:
-weak_framework dcampi\ Library
OK, got it. The CW .lcf file is a dead-end, there's no way to quote or escape that space.
You can also link individual functions weakly, though I don't have the info readily available.
You append "__attribute__((weak_import))" to the declaration (in XCode).
Thanks for the tip on running the man page into Preview, that will be useful as I move to XCode.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|