From: huw Newsgroups: comp.os.msdos.djgpp Subject: Fortran and C linking problem Date: Sun, 04 Oct 1998 16:25:43 +0000 Organization: infoworx Message-ID: <3617A187.8597EA@infoworx.demon.co.uk> NNTP-Posting-Host: infoworx.demon.co.uk X-NNTP-Posting-Host: infoworx.demon.co.uk:158.152.89.112 X-Trace: news.demon.co.uk 907518335 nnrp-10:14356 NO-IDENT infoworx.demon.co.uk:158.152.89.112 X-Complaints-To: abuse AT demon DOT net X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.34 i586) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 22 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi, I have been trying to compile and link some fortran code that makes use of a few C functions. The original came from an RS6000 BTW. Now if I compile the C stuff and place it in a lib with "ar rvs libact.a *.o) where *.o came from compiling (with djgpp) the C stuff it seems to work and I can see the members etc in the new lib. The problem happens when I try and compile the fortran using the libact.a, I get undefined function errors cos say the C function is called "cls()" the the linker seems to want to find "cls_" If I rename the actual function to cls_ then I can get it to link if i specify the actual cls.o file on the compile line but NOT if i put it into a lib. Anyone got any ideas on this please as there are in fact somit like 70 odd c functions / object files so I do not wana have to put em all on the compile line individually, Thanks Huw