nodeeditor icon indicating copy to clipboard operation
nodeeditor copied to clipboard

MSVC linker issue when using static version of a library

Open nickaleks opened this issue 6 years ago • 0 comments

In my current porject, node editor is used a static library. It's used in a dynamic library which is then linked to a test executable. Since I use classes from the library in a test, I am forced to include their headers. This transitively includes header from node editor (such as NodeDataModel). Since a lot of headers have class members definitions inline, this causes definition of those methods to be included both in DLL and the the test's executable.

On Linux, this is resolved via weak symbols, and everything is fine, however on windows, this causes linker to fail with an error about multiple definitions. Is it possible to move definitions inside a source file, so that these sorts of issues do not appear?

nickaleks avatar Nov 21 '19 07:11 nickaleks