using fortran common block from dll created by gfortran
Satish Balay
balay@fastmail.fm
Wed Jun 24 04:30:00 GMT 2015
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@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@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@ps4 ~/junk
$ gfortran --version
GNU Fortran (GCC) 4.9.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cb_test.sh
Type: application/x-sh
Size: 1083 bytes
Desc:
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150624/94496b24/attachment.sh>
-------------- next part --------------
--
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
More information about the Cygwin
mailing list