delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/10/26/11:42:13

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 26 Oct 2005 11:42:01 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cristian gonzalez <morogp AT hotmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Problem compiling a program and his libraries
In-Reply-To: <BAY108-F31C5A5A396AAE317BA734AC7690@phx.gbl>
Message-ID: <Pine.GSO.4.63.0510261140480.27888@slinky.cs.nyu.edu>
References: <BAY108-F31C5A5A396AAE317BA734AC7690 AT phx DOT gbl>
MIME-Version: 1.0

On Wed, 26 Oct 2005, cristian gonzalez wrote:

> Hi.I need help whit cygwin and the compiling of libraries.
> My problem is this:
> I have a program with a function within.The program is this:
>
> void hello3();
>
> main()
> {
> void *lib2;
> void (*func1)();
> hello();
> lib2=dlopen("lib2.dll",RTLD_LAZY);
> func1=dlsym(lib2,"hello2");
> (*func1)();
> }
>
> void hello3()
> {
> printf("hello 3");
> }
>
> The program call to function "hello" ,that is in lib1 wich is compiled against
> the program, and call to lib2 by means of dlopen and dlsym.
> The problem  is in which lib2 call to lib1 and call to the function "hello3"
> that is into de program.I need to compiled so that it allows lib2 to call
> "hello3". I know that this is possible in linux by means of -rdinamyc but this
> doesn't work in cygwin.
> I will write you the lib2 in case it helps you:
>
> int hello2()
> {
> hello();
> hello3();
> }

This was just asked last week.  Googling for 'cygwin dll link "main
executable" site:cygwin.com' brings up this thread:
<http://cygwin.com/ml/cygwin/2005-10/msg00516.html>.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019