Hello again, im really wondering if this is the right list, but anyway if you 
don't mind  please dont kill me. :P

If I take out the linker flags it compiles bu the NSClassFromString doesn't work
if I put the flags -ObjC and -all_load the I get this problem:




ld: duplicate symbol _OBJC_IVAR_$_CCAction.originalTarget_ in 
/Users/GustavPicora/Library/Developer/Xcode/DerivedData/AfrikaWS-hbbkzgjulqurwhepbahwnbcsrcun/Build/Products/Debug-iphonesimulator/libcocos2d
 libraries.a(CCAction.o) and 
/Users/GustavPicora/Library/Developer/Xcode/DerivedData/AfrikaWS-hbbkzgjulqurwhepbahwnbcsrcun/Build/Products/Debug-iphonesimulator/libIADTravelEngine.a(CCAction.o)
 for architecture i386
collect2: ld returned 1 exit status
Command 
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 
failed with exit code 1


:S :S...

thx 

G.


On May 4, 2011, at 7:38 PM, Gustavo Pizano wrote:

> I found why the file not found.. I had the header path wrong.. now its ok.. 
> im gonna try to see if the NSClassFromString works or what... 
> 
> 
> 
> On May 4, 2011, at 7:31 PM, Gustavo Pizano wrote:
> 
>> Quincey Hello and thx for the reply
>> 
>> I need to use the a library because its a iOS project so no framework, and 
>> also because I will be reusing the code in the lib for many other apps not 
>> just this one Im making.. 
>> 
>> So right now I have the following set up:
>> 
>> On my Library Project:
>> 
>> Note: By nothing I mean empty no value
>>      2 Targets: 
>>              -myLibrary :  
>>                              Library Search Paths : nothing
>>                              Other Link Flags : nothing
>>      
>>                              Copy Headers:  As Public : All my Headers. 
>>              -cocos2d
>>              cocos2d lib was easily configured I have done it before for 
>> other UIKit apps 
>> 
>> I compile this project without problem and it compiles.
>> 
>> Now I created my Final app that will use my library
>> 
>> I made a workspace where I put the project and the project that contains the 
>> library, both are there.
>>      -Added the libraries (cocos, myLib) to the project and then link them 
>> to the app.
>> 
>>      Header Search Path : Path to the headers of my library
>>      Other Link Flags : -ObjC -all_Load
>> 
>> 
>> Now in my app delegate I have the line
>> 
>> #import "IADTravelEngine.h"
>> 
>> ...
>> 
>> ..
>> 
>> IADTEDirector * dir = [IADTEDirector sharedDirector]; 
>> 
>> and I get that IADTravelEngine.h No such a file.
>> 
>> 
>> I dunno what I did before to make it work  (Link) and it was working until I 
>> used the NSClassDFromString then I started modifying things and now it 
>> doesnt link again. :S
>> 
>> Any help?
>> 
>> Thx
>> 
>> Gustavo
>> 
>> 
>> 
>> 
>> On May 4, 2011, at 7:11 PM, Quincey Morris wrote:
>> 
>>> On May 4, 2011, at 09:12, Gustavo Pizano wrote:
>>> 
>>>> linker problems
>>> 
>>> Vagueness like this makes it hard to help you. Sometimes the actual error 
>>> messages are important in deciding where to look for a solution.
>>> 
>>>> What can I do? 
>>> 
>>> I'd very seriously suggest you don't use a static library at all. It really 
>>> doesn't provide you with any benefits, so you may as well include the 
>>> source code directly instead.
>>> 
>>> The whole point -- well, *a* whole point -- of a static library (in 
>>> traditional C terms) is to allow you to link just those parts that are 
>>> referenced by your client application, without having to figure it out for 
>>> yourself. This doesn't work very well in Objective-C, because the 
>>> language's dynamism makes it impossible in general to determine what's 
>>> "referenced" at link time.
>>> 
>>> If you have other reasons for library-izing your Objective-C code, a 
>>> framework is a much better choice, probably.
>>> 
>>> 
>> 
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to