Page 1 of 1

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

Posted: Thu Sep 24, 2020 2:51 pm
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

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)?

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

Posted: Fri Oct 02, 2020 6:56 am
by eranif
You can set the extension in the project settings.
If -shared was passed, then yes, you should have a DLL