This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make a Shared Library using Makefile

Ok first ,thanx  for ur reply..
> You haven't said whether what you have tried is working or not.  You
> haven't explained exactly how it is failing and what errors you are
> getting if it is not working.  If you want help you need to be more
> specific.
Here i m going to explain u what actually i want to do.......
what exactly is that i m having a code  which is abt a proxy server. It is linux
based source code and i m porting it to windows with the help of
CYGWIN .. Its exe is working fine ..Now i m going to create add-on
module for that project.. That add- on module requires .so files(in
linux) to be  created by makefile. And now i m using that procedure in
cygwin for windows port. Now when  i m going  to create shared  dll(
in windows using cygwin) by  Makefile , It is giving me ld error which
is i m attaching as a file . I think now i m more specific then

> You shouldn't use "-fPIC" or "-Wl,soname" as far as I know.

Then what options or flags must be taken to create dll ??? (just like
.so files created in linux)

And  ya i m getting  error on delivering mail to u  by
attaching file i m going to display list of errors here itself....(so
sorry for that )..
$ make
g++ examplelib.c -g -O2 -I../../include -I. -Wall -Wno-sign-compare
-Wno-unknown-pragmas -Wno-format -D_GNU_SOURCE -shared -fPIC -L.
-lexample -Wl,-soname,examplelib.DLL -o examplelib.DLL

/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccUwhV6V.o(.text+0x4a): In function
/usr/include/c++/3.3.3/bits/basic_string.h: undefined reference to `putlog(int,
char*, ...)'
c++/3.3.3/bits/basic_string.h: undefined reference to `_hooks'
c++/3.3.3/bits/basic_string.h: undefined reference to `Hooks::Add(void (*)(), in
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccUwhV6V.o(.text+0x161): In function
/usr/include/c++/3.3.3/bits/stl_alloc.h:652: undefined reference to `Section::Se
ction[not-in-charge](std::basic_string<char, std::char_traits<char>, std::alloca
tor<char> >, int)'
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccUwhV6V.o(.text+0x1e9): In function
/home/pradip/proxy17-01-2005/modules/examplelib/examplelib.c:55: undefined ref
erence to `_processors'
/proxy17-01-2005/modules/examplelib/examplelib.c:55: undefined reference to `P
rocessors::Add(int (*)(CONNECTION_T*, Filebuf*), int)'

.........................................SOME MORE ERRORS (not listing
coz its to lengthy..).....

onD0Ev[examplelibSection::~examplelibSection [in-charge
clude/c++/3.3.3/bits/basic_string.h: undefined reference to `Section::~Section [
collect2: ld returned 1 exit status
make: *** [examplelib.DLL] Error 1
waiting for reply...

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]