This is the mail archive of the cygwin@cygwin.com 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: Help! (creating a dynamically linked shared library)


Hi Elfyn,
   It compiled! Thanks. =)  But now I'm trying to
build the .lib and main program in DOS, and DOS isn't
finding the function. My command line is:

cl add.cpp function.lib

Do you know why it's not working?  Thanks again!


~Julie


--- Elfyn McBratney <elfyn@is.ubertales.co.uk> wrote:
> On Mon, 9 Jun 2003, JS wrote:
> 
> > These are the commands I used to create the .lib
> and
> > exports.o files:
> >
> >   gcc -c function.c
> >   dlltool -e exports.o -l function.lib function.o
> >   gcc function.o exports.o -o function.dll
>     ^^^^^^^^^^^^^^
> 
> You need to add the `-shared' flag after invocation
> of gcc eg.,
> `gcc -shared' for shared libs.
> 
> 
> 
> -- 
> Elfyn McBratney (mailto:spambot@is.ubertales.co.uk)
> Systems Administrator
> ABCtales.com / Ubertales.co.uk
> 
> 
> --
> 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/
> 


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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