building a library with CodeLite in Windows -> .exe instead of .dll?

General questions regarding the usage of CodeLite
amwink
CodeLite Enthusiast
Posts: 25
Joined: Mon Jun 08, 2020 4:04 pm
Genuine User: Yes
IDE Question: c++
Contact:

building a library with CodeLite in Windows -> .exe instead of .dll?

Post by amwink »

I would like to use CodeLite in Windows to teach C++. To do everything by the book I installed version 14.0.0 and also MinGW-W64 version 7.1.0.

I tried using CMake as a build tool but that does not seem work in Windows from an NFS share. So now I create a first project to build a .dll (which is needed in all the class project) with the CodeLite Make Generator:

[1] create project
category: Library; type: Dynamic Library; compiler: MinGW-W64-7.1.0; debugger: GNU gdb debugger; build system: CodeLite Make Generator
[2] import files
All existing header and source files in /include and /src, respectively
[3] build project
F7

No errors, and the last line of the build log

Code: Select all

N:/programs/x86_64-7.1.0-release-posix-seh-rt_v5-rev2/ming64.bin/g++.exe -shared -fPIC -o ..\build-Debug\lib\z @../build-Debug/z/ObjectsList.txt -L.
suggests that the .dll is built.

However, the file in the lib directory is called z.exe ...

What I don't know for sure now is:
-- has the file been built correctly? could it be used after renaming?
-- if that is true, is there a way to control the extension of the output (to not to manually rename files all the time)?
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: building a library with CodeLite in Windows -> .exe instead of .dll?

Post by eranif »

You can set the extension in the project settings.
If -shared was passed, then yes, you should have a DLL
Make sure you have read the HOW TO POST thread
Post Reply