Create DLL with .a linking library
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Create DLL with .a linking library
Hi,
I need to create DLL with .a library for Linking. I load dynamically. Should I create another project?
AFAIK, creating DLL should produce .a (.lib) automatically but in my case I see only .dll.
am I missing something here?
I need to create DLL with .a library for Linking. I load dynamically. Should I create another project?
AFAIK, creating DLL should produce .a (.lib) automatically but in my case I see only .dll.
am I missing something here?
CodeLite 15.x
CodeLite is awesome, I just Love it!
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Create DLL with .a linking library
Not really a codelite issue. but more of mingw issue.
You need to create a def file and list there all the symbols that you wish to export, and then run the dlltool.exe tool on it to create the import library
To automate the process, I suggest that you use a post build action similar to:
(assuming that your DLL is created under the $(IntermediateDirectory) directory, which is the case by default)
Read this excellent explanation about dlltool and import library:
http://oldwiki.mingw.org/index.php/Crea ... tLibraries
Eran
You need to create a def file and list there all the symbols that you wish to export, and then run the dlltool.exe tool on it to create the import library
To automate the process, I suggest that you use a post build action similar to:
Code: Select all
dlltool.exe -d MyDll.def -l $(IntermediateDirectory)/libMyDll.a
Read this excellent explanation about dlltool and import library:
http://oldwiki.mingw.org/index.php/Crea ... tLibraries
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Create DLL with .a linking library
Big thanks, Sir!
CodeLite 15.x
CodeLite is awesome, I just Love it!
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Create DLL with .a linking library
What about Linux?
I mostly develop in Linux now days!
I am searching for dlltool alternative for Linux
I mostly develop in Linux now days!
I am searching for dlltool alternative for Linux
CodeLite 15.x
CodeLite is awesome, I just Love it!
-
- CodeLite Enthusiast
- Posts: 37
- Joined: Fri Feb 05, 2010 10:57 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Create DLL with .a linking library
You do not need such a thing.
Linux automatically exports all global variables if you do not say otherwise.
The linking is done against lib<dllname>.so.
Linux automatically exports all global variables if you do not say otherwise.
The linking is done against lib<dllname>.so.
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Create DLL with .a linking library
Thanks Josee,
I wonder why always things in M$ are complicated
I wonder why always things in M$ are complicated
CodeLite 15.x
CodeLite is awesome, I just Love it!
-
- CodeLite Expert
- Posts: 176
- Joined: Sun Aug 17, 2008 2:45 pm
- Contact:
Re: Create DLL with .a linking library
This is my experience for years with MS, seems to be their philosophy.evstevemd wrote:Thanks Josee,
I wonder why always things in M$ are complicated
'Why make things easy when we can make them so nice complicated'
Frank
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Create DLL with .a linking library
That's cool!
CodeLite 15.x
CodeLite is awesome, I just Love it!