Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Using a static library that includes another static library

4: Adsense

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
3 replies to this topic

#1 Wymsical   Members   

122
Like
Likes
Like

Posted 19 July 2001 - 04:14 PM

I''ve got a small problem. I''ve got one library, lets call it library "a". Then i have a second one, lets call it library "b", now b links to a. now when i wright a program that links to both b and a, the linker complains about redefinitions. They''re only warnings, but but going through 400 warnings every time i want to recompile gets annoying somtimes. how do i get by this?

#2 Void   Members   

126
Like
Likes
Like

Posted 22 July 2001 - 03:13 PM

That should not happen. Your library ''a'' and ''b'' may have functions or variables that are of the same declaration.

You can fix them by declaring them static or using namespaces.

#3 Gorg   Members   

248
Like
Likes
Like

Posted 22 July 2001 - 05:32 PM

hmm, how do you make static libs link with another static lib?

A static lib should only be a container of code :*NOHTING IS LINKED*. So, if a static lib a uses function from a lib b, you simply compile lib a.

then, whenever you want to use lib a in a program you will need to link with lib a and also have to link to lib b so that all the functions in a that uses function in b be linked correctly.

#4 Wymsical   Members   

122
Like
Likes
Like

Posted 22 July 2001 - 06:53 PM

lib a is my general general programming stuff. stuff thats not even specific to game programming, like containers, ascii parsers, etc. i wanna keep all that separte. lib b is my general game stuff. when i compile the proejct that uses both a and b, it complains about every global variable, every global function, every function of every class, and every static variables in all the classes.




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.