[LLVMdev] Problems linking shared library with __declspec(dllexport)

Anton Korobeynikov anton at korobeynikov.info
Sun Oct 11 14:21:34 PDT 2009


> I am trying to use llvm-gcc to link shared libraries on windows/mingw32.
> When I try to link libraries that contain functions declared with
>  __declspec(dllexport) someFunction();
>
> I get the link error:
>
>  Cannot export _someFunction: symbol not found
dllexport declspec should be put on the function definition, in this
example there is nothing to export - dllexport without function body
is meaningless.

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University




More information about the llvm-dev mailing list