Mail Archives: cygwin/2004/08/10/19:21:15
Hello,
(this is a repeat post, as I have not seen the first one on the list)
I am trying to link a numerical routine written in Fortran to a data
analysis application running on MS Windows 2000(IDL from RSI -- see
www.rsinc.com). IDL is compiled using MS' visual C compiler.
IDL has provisions to link external routines to it. In essence, I have
to generate a dll, and provide IDL with 1) the dll name and 2) entry
point into the dll (i.e. a symbol for the subroutine that IDL will be
calling).
I've been using gcc on cygwin with the following command in order for my
dll to use MS' and not Cygwin's dll:
g77 -share -fPIC -mno-cygwin ...
If I compile and link with Cygwin's dll (don't use the -mno-cygwin
option), I'll get IDL to crash all the time. I guess that is because of
some conflicts between Cygwin's and MS dll's.
Using -mno-cygwin works for some cases and not others (i.e, causes IDL
to not to crash or crash. Basically, if I pass the routine a vector of
values, it will cause IDL to crash and conversely, if I pass it a
scalar, it will run fine and return to IDL.
(No, this has nothing to do with incompatibility with declared variables
in the routine. Instead, if I am passing a vector, I call one interface
Fortran routine with a Do loop over the individual values in the vector,
and if I am passing a scalar, I am calling a different interface routine.)
My question is: are there other switches or options that I need to use
so as not to cause conflicts between Cygwin compiled dll's and MS
utilitites?
I understand that I may be mis-using Cygwin. I am thus considering to
do the compilation and dll creation using MinGW, because, as I
understand it, that package is meant for program development on the MS
platform. However, I am not certain as how to create a DLL in MinGW
that is compatible with software compiled with MS' compiler. I posted a
such a question on the MinGW list.
Any suggestions or pointers to documentation?
Thanks,
Mirko
--
*m*irko*vukovic*-at-*nycap*ital-*r*oad*r*unner-com
--
*m*irko*vukovic*-at-nycap-rr-com
--
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 -