Subject: Re: Make a Shared Library using Makefile
From: Brian Dessent <[email-masked]>
To: [email-masked]
Date: Thu, 27 Jan 2005 03:02:58 -0800

Pradip Jadav wrote:

> I had posted one mail few days ago ,but didn't got the reply..  ok no

Maybe because this is covered in the users guide and referenced in the
FAQ?  <http://cygwin.com/cygwin-ug-net/dll.html>

> CXX = g++
> CXXFLAGS = -g -O2 -I../../include -I. -Wall -Wno-sign-compare
> -Wno-unknown-pragmas -Wno-format -D_GNU_SOURCE
> example.dll : example.c
>         ${CXX} $< ${CXXFLAGS} -shared -fPIC -L. -lexample -Wl,-soname,$@ -o $@
> clean:
>         rm -f libexample.dll example.dll

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

> Also i m having all libraries for my .c file.. So my query is that "
> Is it the right way to create a DLL using such makefile?? ", Or is
> there any other way to create a DLL ??????? I know i asked this query
> earliar but i have given the way at which i m going to create a DLL
> file.. Any help will be appreciated..

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.

Brian

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