delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/06/24/04:24:41

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; q=dns; s=default; b=fV
YB8hfYfmu6SQW/Tm+jBdcGvyMNJNeHcIZ2HiVp55GG+0iTq1W4FzI4gn5v2u+DjS
B0QFscm7O2Si0kKZHsDRK47w9f6lptBwN6mhUq1vc7fuNRS+6za04iXCqSHJkGvv
RXHukGHJSGozb9MmekAjLDydthADqJYs0q+aBx6GY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; s=default; bh=cFyg5HhA
JnQXpNX2gQSpCVrmEhE=; b=DhlLBGela+TY6X3QZAoIRA+ZHd4+Nm71mGuBOKQj
kIGmCKkyXzgk40FGp163FVeoV96reyFffPyA4HLfLTqtDy++jh2m4j7tte2/b/rY
HGD27ZuCHbYM/mVmmDK6/zTlatB4BWw2siCfWgDT3ZanfMmvI4MClwMBmnNt8QHE
9rM=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-wg0-f53.google.com
MIME-Version: 1.0
X-Received: by 10.180.89.66 with SMTP id bm2mr2734798wib.6.1435134257878; Wed, 24 Jun 2015 01:24:17 -0700 (PDT)
In-Reply-To: <alpine.LFD.2.11.1506232245380.28689@asterix>
References: <alpine DOT LFD DOT 2 DOT 11 DOT 1506232245380 DOT 28689 AT asterix>
Date: Wed, 24 Jun 2015 10:24:17 +0200
Message-ID: <CAMCbSMo0xK3eDD0MHoxSqXW+Uw=Ko7VNk6gFoC4b6qGQin5SSA@mail.gmail.com>
Subject: Re: using fortran common block from dll created by gfortran
From: Arjen Markus <arjen DOT markus895 AT gmail DOT com>
To: Andrey Repin <cygwin AT cygwin DOT com>
X-IsSubscribed: yes

Hi,

while this is not directly related to gfortran on Cygwin, this article
might help you appreciate the issues involved:
https://software.intel.com/en-us/node/535307

Are you bound to common blocks? If not, you may get better results
when you put the data in a module.

Regards,

Arjen

2015-06-24 6:30 GMT+02:00 Satish Balay <balay AT fastmail DOT fm>:
> Hi Cygwin,
>
> I'm debuging an issue with dlls with cygwin gnu compilers - and have
> narrowed down the issue to the attached test case [script].
>
> Could you guide me to correct usage of 'fortran common block' with dlls?
>
> [In this example - using fortran 'common block' via static library
> works. However the same code using a .dll fails]
>
> Thanks,
> Satish
>
> ---------
>
> balay AT ps4 ~/junk
> $ ./cb_test.sh
> + cat
> + cat
> + rm -f '*.o' '*.dll' '*.a' '*.exe'
> + gfortran -c cb_func.f cb_main.f
> + ar cr libcb_static.a cb_func.o
> + gfortran cb_main.o -L. -lcb_static -o cb_main_static
> + gfortran -shared -o libcb_dynamic.dll cb_func.o
> + gfortran cb_main.o -L. -lcb_dynamic -o cb_main_dynamic
> + ./cb_main_static
>  GOOD COMMON BLOCK
> + ./cb_main_dynamic
>  BAD COMMON BLOCK
>
>
> balay AT ps4 ~/junk
> $ uname -a
> CYGWIN_NT-6.1 ps4 2.0.4(0.287/5/3) 2015-06-09 12:22 x86_64 Cygwin
>
> balay AT ps4 ~/junk
> $ gfortran --version
> GNU Fortran (GCC) 4.9.2
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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