Making a DLL with clang
Feb 7, 2013 at 3:06am UTC
I'm trying to make a DLL with clang. I'm following a tutorial for MinGW (because I am using the version of clang for MinGW) and it stops at a linker error.
My Test.cpp:
1 2 3
void __declspec(dllexport) f()
{
}
I am invoking clang as:
clang++ -v -std=c++11 -shared -o Test.dll -Wl,--out-implib,libTest.lib Test.cpp
When I build I get this
https://gist.github.com/LB--/4728067
(Speficially,
Cannot export __Z1fv: symbol not found )
Edit: if I wrap it in
extern "C"
then it has the same error but with
_f
Last edited on Feb 7, 2013 at 3:44am UTC
Topic archived. No new replies allowed.