sammycage / lunasvg

SVG rendering and manipulation library in C++
MIT License
866 stars 124 forks source link

LINKER ERROR #9

Closed kimhao97 closed 4 years ago

kimhao97 commented 4 years ago

I cann't declare VGDocument document. Maybe, I forget .lib files ? My code:

 #include "lunasvg/include/svgdocument.h
 using namespace lunasvg;
 SVGDocument document;

However, this won't compile and gives many errors similar to: Error LNK2019 unresolved external symbol "public: thiscall lunasvg::SVGDocument::SVGDocument(void)" (??0SVGDocument@lunasvg@@QAE@XZ) referenced in function "void cdecl `dynamic initializer for 'document''(void)" (??__Edocument@@YAXXZ)

sammycage commented 4 years ago

Please take a look at this - https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix

sammycage commented 4 years ago

I don't have access to VISUAL STUDIO. just try this. build static lib

cmake -DBUILD_SHARED_LIB=OFF ..