This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fortran calling c compilation problem


On 08/01/2006, Ben Wright wrote:
I'm working on a project that uses a combination of c++, c and fortran to build a library for use with the Java Native Interface. The library compiles correctly under Linux with gcc 3.2.3, but I can't get it to compile correctly under cygwin (using gcc 3.4.4).

I'm calling:

g++ -mno-cygwin -Wl,--add-stdcall-alias -I/cygdrive/c/Java/jdk1.5.0_07/include -I/cygdrive/c/Java/jdk1.5.0_07/include/win32 -shared -o Samplers.dll <a whole bunch of source files here> -lstdc++ -lg2c

/cygdrive/c/DOCUME~1/ben/LOCALS~1/Temp/ccWWbiIF.o:gengam.f(.text+0x5): undefined reference to `_dgamdv_'
(plus others of similar form)

The '-mno-cygwin' flag trigggers the "cross-compiler" to MinGW. If you're having problem with this switch, you should check with the MinGW folks (http://www.mingw.org/), since you're really using their compiler, not Cygwin's.


-- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]