Folks,
I am getting an unresolved external when trying to create a shared library. I
would appreciate it if someone can help me identify the problem.
Here is my simplified main.cpp program:
#include <libzfs.h>
int main() {
libzfs_init();
return 0;
}
When I compile this program to create a standard executable, there are no link
errors:
$ g++ -lzfs -o main main.cpp
Note: For clarity, I have removed a couple of include parameters.
In my case, I need to create a shared library. Here is the command I am using:
$ g++ -lzfs -o main.so main.cpp -shared
However, now I get an unresolved error for "libzfs_init."
If I add any std templates such as string, vector, I get a bunch more errors.
Can someone please tell me how to fix it? It must be some simple switch on the
linker.
Thank you in advance for your help.
Regards,
Peter
--
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code