I am using Borland C++ Builder6 to create a .dll. The programm works fine but I can't use memcpy() from math.h or string.h as I get a Linker Error (Unresolved external 'memcpy' referenced)
when using it.
Does anybody have an idea of how to solve this issue?
It takes seconds for rating…that actually compensates the minutes taken for giving answers The biggest guru-mantra is: Never share your secrets with anybody. It will destroy you.
Regards, Be generous->Rate people
Jayender!!
As soon as I use the method I get a Linker Error.
When I create a stand alone .exe it works fine but if I want to use the same source within a .dll -> Error. :-(
Meanwhile I use my own implementation, but I am not sure if it works so faultless as the mem.h version.
memcpy(void *dest, const void *src, size_t n){
for(int i = 0; i < n; i++){
*(dest++) = *(src++);
}
}
As soon as I use the method I get a Linker Error.
When I create a stand alone .exe it works fine but if I want to use the same source within a .dll -> Error. :-(
well i dont know whats the problem exactly...can you attach your project here?
so we can take a look?
another thing instead of using your owm implementation you can try using the ::CopyMemory(..) api.
Cheers
If a post helped you dont forget to "Rate This Post"
Check your linker settings. Unresolved external symbol happens when the linker is unable to find the implementation of certain functions inside any of the library files that it is linking. It has nothing to do with inclusion of header files.
@golanshahar
I get the same error when using CopyMemory as when using memcpy.
Unfortunatly the project is to huge to poste the entire source so I just made a screen shot of the current implementation and the error I get.
@Wombat
I tryed all the linker settings. the settings work when creating a .exe. the error only occurs when creating a .dll.
I had the same error with some of my own methods in referenced files but I was able to fix them by putting a "__declspec(dllexport) __stdcall " infront of those methods.
But with memcpy I can't solve it that way.
I am using Borland C++ Builder6 to create a .dll. The programm works fine but I can't use memcpy() from math.h or string.h as I get a Linker Error (Unresolved external 'memcpy' referenced)
when using it.
Does anybody have an idea of how to solve this issue?
First math.h doesn't contain dec about memcpy() function
For this u have to use
<memory.h> or <string.h>
can u Show How and where u r including this files and what's the link error u r getting.
Last edited by humptydumpty; October 18th, 2005 at 02:51 AM.
Maybe the Borland C++ Builder is (auto)linking some default libraries only for ".exe" projects; you can check the settings and add all the linker options used for the .exe also to your dll.
I am using Borland C++ Builder6 to create a .dll. The programm works fine but I can't use memcpy() from math.h or string.h as I get a Linker Error (Unresolved external 'memcpy' referenced)
when using it.
Does anybody have an idea of how to solve this issue?
Check "Project->Options->Advanced Compiler->Output(Generate underscores)" - must be have.
Me help with memcpy() in .dll on Borland C++ Builder 6 sp4
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.