Best way to get a dub generate visuald-generated visuald project to be a .lib / .obj for static linking?
evilrat
evilrat666 at gmail.com
Wed Jun 18 05:13:34 UTC 2025
On Wednesday, 18 June 2025 at 02:20:11 UTC, Daniel Donnelly, Jr.
wrote:
> I messed with the settings in the VisualD project settings from
> within visual studio:
>
> Compiler: DMD
> Output Type: Library
> Subsystem: Windows
> Output Path: (absolute path to my project root folder)
> Intermediate Path: (ditto)\obj
> Files to Clan: *.cmd;*.build;*.sep (deleted *.obj)
> Compilation: Separate compile and link
>
> Still though, when I hit build or run a .EXE gets produced.
>
> My end goal is to have a C++ / Qt GUI project under Qt Tools
> for VS and a VisualD project under the same solution. The
> Qt/C++ app then makes use of a class hierarchy defined on the
> D-side. But it needs to be either a static library or a DLL
> obviously!
>
> I generated the project using dub init ... dub generate
> visuald. Reason: I needed to add pegged library to the D
> project.
>
> So I see two ways: figure out how to get VisualD to make a
> static library, or figure out how to add pegged to a
> VisualD-created project (from which I select "Library" when
> creating).
You can always regenerate visuald project after editing dub
project, though if you are already heavily modified that
auto-generated solution to your needs... well it was your fault.
I suggest you to double-check projects settings as you can easily
put these settings on a wrong project or configuration
(Debug|x86, Release|x86, Debug|x64, etc...), also make sure the
output path is not having an .exe name, etc...
More information about the Digitalmars-d-learn
mailing list