Hi Jón,

I was wonder if I could easily build a static version of ECL on windows to link into other C++ projects without having to ship the ECL.dll with it.

There is a "ecl-static.lib" recipe in the Makefile in the ./msvc folder which I can build after having built "all", but when linking that into an application that does nothing but call cl_boot() the linker (VS2015) complains with

LNK2019unresolved external symbol __imp__cl_boot referenced in function _main


The Makefile recipe is correct, however linking to the library it creates is a bit tricky and requires additional flags and system libraries to be added to the command line. For example

cl /Fe:test.exe /I C:\path\to\ecl\installation /DECL_API /MD test.c ecl-static.lib user32.lib ws2_32.lib shell32.lib

if you have compiled without the ECL_DEBUG option active (for compilation with this option active, replacing /MD by /MDd should work).

Best regards,
Marius Gerbershagen


Reply via email to