1
I’m having a problem, my dll has not exported the methods for me to use in other programs.
I did it this way:
namespace integration {
class RESTRequest {
public:
__declspec(dllexport) string GetPing(char* ping);
private:
static void MarshalString(String ^ s, string& os);
};
}
It is compiling nice, but when I try to access the ddl with a java program, give this error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up function 'GetPing': The specified procedure could not be found.
For me the export took place with __declspec(dllexport)
in the way, but by the way not only worked with it, I have to add some more deltalhe in dll ?
I think a name inside a namespace cannot be exported to Java...if it is a class method, then it must be a "static" method...
extern "C"
...in a simple case (without classes and without namespaces) would look like this:extern "C" declspec(dllexport) GetPing(char* ping);
– zentrunix
In the commentary I put "declspec", it is "__declspec", of course
– zentrunix