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