Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <5f0807670501270551626a20d9@mail.gmail.com> Date: Thu, 27 Jan 2005 19:21:24 +0530 From: Pradip Jadav Reply-To: Pradip Jadav To: cygwin AT cygwin DOT com Subject: Re: Make a Shared Library using Makefile In-Reply-To: <5f08076705012702164bfcacd9@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <5f08076705012702164bfcacd9 AT mail DOT gmail DOT com> X-IsSubscribed: yes 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, std::alloca tor >, 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/