Re: Recognise classes between libraries
Re: Recognise classes between libraries
- Subject: Re: Recognise classes between libraries
- From: Livio Isaia <email@hidden>
- Date: Wed, 30 Jul 2014 09:42:17 +0200
Il giorno 30/lug/2014, alle ore 09:02, Jens Alfke <email@hidden> ha scritto:
>
>> On Jul 29, 2014, at 11:15 PM, Livio Isaia <email@hidden> wrote:
>>
>> I’m trying to create a C++ dynamic library which in turn uses other dynamic libraries.
>
> This can be done, but it’s kind of fragile; it’s easy for minor changes in a C++ library you depend on to break your own code. (Look up “Fragile Base Class Problem” for a discussion of the most common issue with C++ shared libraries.) Unless you can control both libraries and keep them in lock-step with each other, I don’t recommend doing this.
>
>> Library A (precompiled, not by me) contains mesh.h which declares class aMesh.
>
> To be pedantic: Libraries don’t contain headers. They contain compiled code, and export symbols naming that code; the headers just describe the exported symbols to the compiler. The header is used at compile time, and the library is used at link time.
>
>> I checked all the project settings (Header search path etc.) and could’t find anything wrong.
>
> The header search path only has an effect at compile time. If you’re getting linker errors, what you need to check is the library search path. (And also double check that you actually added the library to the Link Binary With Libraries build phase of your target.)
>
> —Jens
Thanks jens,
I get compiler error, not linker (my fault, wasn’t clear): “Unknown type name “aMesh. Did you mean Mesh?” and my answer is no, I meant aMesh, and it should be known as <mesh.h> is included…
livio.
_______________________________________________
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