delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/14/12:46:06

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Sat, 14 Apr 2001 18:45:26 +0200
To: cygwin AT cygwin DOT com
From: lemkemch AT t-online DOT de (Michael Lemke)
Subject: g77/dllwrap: getarg returns nothing
X-Mailer: Opera 5.10 build 902
X-Priority: 3 (Normal)
Mime-Version: 1.0
Message-ID: <14oTAs-20qTh2C@fwd01.sul.t-online.com>
X-Sender: 520098960173-0001 AT t-dialin DOT net

I am trying for the first time to build a dll and I've stumbled across this:
g77 getarg returns nothing if called from a dll.  This is what I did:

Test> cat test.f
        program test
        implicit none

        character x*132
        integer i

        call geti( x, i )

        end

Test> cat geti.f
        subroutine geti( image, len_image )
        implicit none

        character*(*) image
        integer len_image

        character*20 prg_name

        call getarg( 1, prg_name )
        print *, 'getarg''ed: |'//prg_name//'|'

        end

Test> g77 -c test.f
Test> g77 -c geti.f
Test> g77 test.o geti.o
Test> ./a blah
 getarg'ed: |blah                |
Test>

Ok, that works.  Here's the problem:

Test> dllwrap --driver-name g77 --implib libgeti.a  --export-all -o geti.dll geti.o
dllwrap: no export definition file provided
dllwrap: creating one, but that may not be what you want
Test> g77 test.o -L . -lgeti
Test> ./a blah
 getarg'ed: |                    |

Now there is nothing between |...|

Is there anything special that has to be done for the dll?  Some magic
initialization or declaration?

I'd really like this to work.  I couldn't find anything in the FAQ, documentation
etc.  The only impression I got is that dll's are a rather complicated beast.

Thanks,
Michael


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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