Displaying 3 results from an estimated 3 matches for "libfunction".
Did you mean:
difunction
2009 Oct 12
1
[LLVMdev] Problems linking shared library with __declspec(dllexport)
...ess.
Ok, you're right.
The declaration is actually there in the function definition.
Sorry to provide a broken example.
Here is a more acurate one:
--- function.c
__declspec(dllexport) someFunction()
{
printf("Hi\n");
}
---
Compiling this gives:
$ llvm-gcc -shared -o libfunction.dll function.c
Cannot export _someFunction: symbol not found
collect2: ld returned 1 exit status
Thanks,
Ronald
2009 Oct 11
3
[LLVMdev] Problems linking shared library with __declspec(dllexport)
Hi all,
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
Removing the declspec directive solves the problem, but this is not a
very feasible solution for me.
Using 'regular' gcc does not
2009 Oct 11
0
[LLVMdev] Problems linking shared library with __declspec(dllexport)
> 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