Jump to content

  • Log In with Google      Sign In   
  • Create Account


Linking external library to my library


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Jeffreyp   Members   -  Reputation: 178

Like
0Likes
Like

Posted 23 June 2012 - 12:42 PM

Heey,

I have a question about linking an external library to my library.
When i try to link my library and use it, it needs the know about the other (external)library includes etc.
How do i include that external library in my dll so that the user doesn't have to download the external library's
header files etc? I couldn't find anything useful with google.

For example if i'm making a openGL wrapper how do i include it so that the user doesn't have to
download the openGL sdk?

Thanks in advance

Edited by Jeffreyp, 23 June 2012 - 12:42 PM.


Sponsor:

#2 Heinrich Zweihänder   Members   -  Reputation: 108

Like
1Likes
Like

Posted 23 June 2012 - 01:04 PM

I don't understand : Header files are used only for the compilation and linkage process. If you're using a dynamic library, the user only needs to have the dll's somewhere reachable. On modern-day computer, dll's for opengl are likely already installed.

Have you try to build an application test and to run it on another computer ? Did you meet any trouble ? If yes, you'd better tell us.

Edited by Heinrich Zweihänder, 23 June 2012 - 01:04 PM.


#3 Jeffreyp   Members   -  Reputation: 178

Like
0Likes
Like

Posted 23 June 2012 - 04:20 PM

Yes, the problem is that if i link my library to an example project i get errors that the headers(in the library) cannot be found.
However when i build my library i don't get any errors.

So what i mean is this :

MyLibHeader.h

#include <AnotherHeaderFromAnotherLib.h> <--- this cannot be found

....


Edited by Jeffreyp, 23 June 2012 - 04:23 PM.


#4 Bregma   Crossbones+   -  Reputation: 4818

Like
1Likes
Like

Posted 23 June 2012 - 05:21 PM

Sounds like you're including the third-party header in your headers.

Try reading up on the PIMPL idiom, perhaps.
Stephen M. Webb
Professional Free Software Developer

#5 Jeffreyp   Members   -  Reputation: 178

Like
0Likes
Like

Posted 24 June 2012 - 04:20 AM

Sounds like you're including the third-party header in your headers.

Try reading up on the PIMPL idiom, perhaps.


Yes this is what i mean : )
I will read it up thanks.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS