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
earliar.........

> 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 wait.....as 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
`_ZNSt4listI9examplelibSaIS0_EE6insertESt14_List_iteratorIS0_RS0_PS0_ERKS0_':
/usr/include/c++/3.3.3/bits/basic_string.h: undefined reference to `putlog(int,
char*, ...)'
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccUwhV6V.o(.text+0x86):/usr/include/
c++/3.3.3/bits/basic_string.h: undefined reference to `_hooks'
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccUwhV6V.o(.text+0x92):/usr/include/
c++/3.3.3/bits/basic_string.h: undefined reference to `Hooks::Add(void (*)(), in
t)'
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccUwhV6V.o(.text+0x161): In function
 `_ZN16examplelibSectionC2Ev':
/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
 `_ZN16examplelibSectionC2Ev':
/home/pradip/proxy17-01-2005/modules/examplelib/examplelib.c:55: undefined ref
erence to `_processors'
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccUwhV6V.o(.text+0x1f5):/home/pradip
/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..).....

/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccUwhV6V.o(.text$_ZN16examplelibSecti
onD0Ev[examplelibSection::~examplelibSection [in-charge
deleting]()]+0xb7):/usr/in
clude/c++/3.3.3/bits/basic_string.h: undefined reference to `Section::~Section [
not-in-charge]()'
collect2: ld returned 1 exit status
make: *** [examplelib.DLL] Error 1
----------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
waiting for reply...

--
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/


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