Page 1 of 1

Generate DLL/So and its .a file

Posted: Mon Sep 02, 2013 11:59 pm
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.

Re: Generate DLL/So and its .a file

Posted: Tue Sep 03, 2013 11:44 am
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

Re: Generate DLL/So and its .a file

Posted: Tue Sep 03, 2013 12:51 pm
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 :)

Re: Generate DLL/So and its .a file

Posted: Tue Sep 03, 2013 1:49 pm
by Jarod42
You may use the gcc link flag:

Code: Select all

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