Code::Blocks Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
As usual while waiting for the next release - don't forget to check the
nightly builds
in the forum.
Home
Help
Search
Login
Register
Code::Blocks Forums
»
User forums
»
General (but related to Code::Blocks)
»
How to create a simple dynamic link library?
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: How to create a simple dynamic link library? (Read 4876 times)
tiger
Guest
How to create a simple dynamic link library?
«
on:
November 12, 2006, 09:32:39 am »
Hi all.
I'm trying to create a dynamic link library (.so file on linux-ubuntu).
Here is my config:
After building I only get a .so file. I think there should be a .sa or .a file created too.
Anyone shows me how to create a simple working dynamic link library?
Thank you
Logged
mandrav
Project Leader
Administrator
Lives here!
Posts: 4315
Re: How to create a simple dynamic link library?
«
Reply #1 on:
November 12, 2006, 09:50:43 am »
I don't understand the question. The .so file is the dynamic link library (shared object). The .a file would be produced if you were creating a static link library.
Logged
Be patient!
This bug will be fixed soon...
tiger
Guest
Re: How to create a simple dynamic link library?
«
Reply #2 on:
November 12, 2006, 01:41:18 pm »
I mean there should be a .sa created to link with the dynamic link lib file.
If there is only a .so file, how can I use it? (use functions stored in .so file in a new program).
Logged
tiger
Guest
Re: How to create a simple dynamic link library?
«
Reply #3 on:
November 12, 2006, 04:16:58 pm »
Finally, I know the answer. In linux we don't need an import library to use a shared library (.so file).
We only have to add extern "C" in front of each function we want to export. :lol:
Logged
Game_Ender
Lives here!
Posts: 551
Re: How to create a simple dynamic link library?
«
Reply #4 on:
November 12, 2006, 06:45:58 pm »
With gcc and ld you don't need an import library and you don't have to extern anything. Those two things are "features" on windows.
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
Code::Blocks Forums
»
User forums
»
General (but related to Code::Blocks)
»
How to create a simple dynamic link library?