Hi to all, I am trying to create dll in cygwin. I read, http://www.cygwin.com/cygwin-ug-net/dll.html . But didn't got much help from that document.
I am porting Linux code to windows using cygwin. I am done with main program. But want to create add-on module for that program as I have done in Linux. The Makefile to create add-on module in linux is, --------------------------------------------- sample.so: sample.c g++ sample.c -I. -I../../include -pthread -D_REENTRANT -Wl,-soname,sample.so -shared -fPIC -o sample.so clean: rm -f sample.so sample.so --------------------------------------------- It creates a .so file and works fine with my main program in Linux. So now I want to create .DLL file in cygwin using above Makefile. So made some changes in Makefile like, --------------------------------------------- sample.dll: sample.c g++ sample.c -I. -I../../include -D_REENTRANT -Wl,-soname,sample.dll -shared -o sample.dll clean: rm -f sample.dll sample.dll --------------------------------------------- But when I compiles in cygwin it gives me some "Undefined reference" errors. Take an example, /cygdrive/e/DOCUME~1/LOCALS~1/Temp/ccLMFYUe.o:sample.c:(.text+0x4c): undefined reference to `createlog(int, char*, ...)' Now this "createlog" function is defined in one of .cpp file of my main program.(Just for your information) Can you help me to solve problem of "undefined reference" ?? -- Regards, Pradip -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/