Hello,
I was trying to write a shared library in c, and was using it in a .cpp file.
I tried in linux and in my .cpp file i included my shared library's header file with extern C statement, like
extern "C" {
# include <myfile.h>
}
and it worked well.
Now with the same set of files I was trying it on windows with Cygwin.
But i get an error saying the
undefined reference to `_myFunction' .
I am wondering how to tell the compiler on cygwin that my shared files are in c.
One difference with linux is that, with cygwin the linking is static, i have to create .a file rather than .so .
Any idea anybody please....
thank u
her...
I was trying to write a shared library in c, and was using it in a .cpp file.
I tried in linux and in my .cpp file i included my shared library's header file with extern C statement, like
extern "C" {
# include <myfile.h>
}
and it worked well.
Now with the same set of files I was trying it on windows with Cygwin.
But i get an error saying the
undefined reference to `_myFunction' .
I am wondering how to tell the compiler on cygwin that my shared files are in c.
One difference with linux is that, with cygwin the linking is static, i have to create .a file rather than .so .
Any idea anybody please....
thank u
her...