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:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=T+rxirjBkF8j2Ifk7HmQbFueyUYUg OIJmz7tXNkuPcjF2jfNW8idnov28e7+Sq2XO7y2LRRz/E8cdBvzjGoPNxiDN/0o3 HwLb8C/PHgjamycJGzLgB0pRKUkf1uDmp0o0UiqAmq429K0pFygxQCzqyDCWhLe4 RaIFW3gklSuv8c= 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:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=uLWG5dVgjyCIUhONhMVoZOyDfRk=; b=d2e BcJz828r3Pr7poDVfaXgkZRPotSgaqZQC253QOKBztAXqGUBAuEtGjyY0rdQ9Q/L JYoJaJO/FysV1dvjacNlvotB+vU7AzZV9uU0Hiw+eE0r4QXspAVXqE+XljQjfyav xxtU4bRFZlEsXCq1xmAhRWrlifLpvue6G9EK/zmo= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: out5-smtp.messagingengine.com Date: Tue, 23 Jun 2015 23:30:11 -0500 (CDT) From: Satish Balay To: cygwin AT cygwin DOT com Subject: using fortran common block from dll created by gfortran Message-ID: User-Agent: Alpine 2.11 (LFD 23 2013-08-11) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1451561632-1435120211=:28689" --8323328-1451561632-1435120211=:28689 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 --8323328-1451561632-1435120211=:28689 Content-Type: APPLICATION/x-sh; name=cb_test.sh Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=cb_test.sh IyEvYmluL3NoIC14CmNhdCA+Y2JfbWFpbi5mIDw8XEVPRgogICAgICBwcm9n cmFtIGNiX21haW4KICAgICAgaW50ZWdlciBjdmFyCiAgICAgIGNvbW1vbiAv Y2IxLyBjdmFyCiAgICAgIGN2YXIgPSAwCiAgICAgIGNhbGwgY2JfZnVuYygp CiAgICAgIGlmKGN2YXIuZXEuMikgdGhlbgogICAgICAgICAgd3JpdGUoKiwq KSdHT09EIENPTU1PTiBCTE9DSycKICAgICAgZWxzZQogICAgICAgICAgd3Jp dGUoKiwqKSdCQUQgQ09NTU9OIEJMT0NLJwogICAgICBlbmRpZgogICAgICBl bmQKRU9GCmNhdCA+Y2JfZnVuYy5mIDw8XEVPRgogICAgICBzdWJyb3V0aW5l IGNiX2Z1bmMoKQogICAgICBp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ascii -- 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 --8323328-1451561632-1435120211=:28689--