Generate DLL/So and its .a file

General questions regarding the usage of CodeLite
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Generate DLL/So and its .a file

Post by evstevemd »

I use GCC and I need to Generate DLL file (I can do with shared Library) and archive .a file for linking purposes.
My app need to do dynamic linking so I need .a Is there a way out with CodeLite?

TIA,
M.

CodeLite 15.x
CodeLite is awesome, I just Love it!

User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Generate DLL/So and its .a file

Post by eranif »

evstevemd wrote:I use GCC and I need to Generate DLL file (I can do with shared Library) and archive .a file for linking purposes
With gcc (MinGW) you don't need that .a, gcc allows you to link directly to the DLL

To generate a DLL simply change the project type to "Dynamic Library" (project settings -> common settings -> general -> Project Type)
In the "Output File" on that page, set the name you want , e.g.

Code: Select all

$(ProjectName).dll
Eran
Make sure you have read the HOW TO POST thread
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Generate DLL/So and its .a file

Post by evstevemd »

eranif wrote:
evstevemd wrote:I use GCC and I need to Generate DLL file (I can do with shared Library) and archive .a file for linking purposes
With gcc (MinGW) you don't need that .a, gcc allows you to link directly to the DLL

To generate a DLL simply change the project type to "Dynamic Library" (project settings -> common settings -> general -> Project Type)
In the "Output File" on that page, set the name you want , e.g.

Code: Select all

$(ProjectName).dll
Eran
Thats great.
I know already how to generate so/dll and I knew that in Linux you can link .so directly.
I was afraid that I needed .a for windows and thanks for the information!

Thread solved :)

CodeLite 15.x
CodeLite is awesome, I just Love it!

User avatar
Jarod42
CodeLite Expert
Posts: 239
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Generate DLL/So and its .a file

Post by Jarod42 »

You may use the gcc link flag:

Code: Select all

-Wl,--out-implib="outputlib.a"
Post Reply