home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.fortran:4301 comp.os.msdos.programmer:10550
- Newsgroups: comp.lang.fortran,comp.os.msdos.programmer
- Path: sparky!uunet!ukma!wupost!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!vet.vet.purdue.edu!kelley
- From: kelley@vet.vet.purdue.edu (Stephen Kelley)
- Subject: Re: Mixed Language MS C calls MS FORTRAN 5.1 (DOS) (help!)
- Message-ID: <BxM3s3.8qs@mentor.cc.purdue.edu>
- Sender: news@mentor.cc.purdue.edu (USENET News)
- Organization: Purdue University SVM
- References: <BxJIvH.2J9@news.cso.uiuc.edu>
- Date: Thu, 12 Nov 1992 16:43:14 GMT
- Lines: 36
-
- In article <BxJIvH.2J9@news.cso.uiuc.edu> btbg1194@uxa.cso.uiuc.edu (Bradley T Banko) writes:
- -
- - I am having some problems trying to do some mixed language programming
- - using MS C (5.0) to call MS FORTRAN (5.1) functions. I think that I have
-
- - I wrote a second program to test the Fortran subroutines, and I get a
- - bunch of *link* time errors:
- -
- - L2025 symbol defined more than once
- -
-
- Try using the /NOD (no default library) linker switch, and explicitly
- listing the fortran and C libraries. This is what I do and it usually
- works. (I don't do it often enough, though, so I end up trying all
- the permutations of my own library, and the two language libraries.)
-
- The order of library searching is important.
-
- You'll end up with a link command that looks something like this :
-
- LINK /NOD /NOE cmain.obj forsubs.obj,,,llibce llibfore;
-
- (This is off the top of my head, you'll need to make sure you use the
- correct names for the libraries you want, and try the libraries in
- different orders.)
-
- The main key to your problem, though, is that you are using two default
- libraries that redefine system calls. When you use the /NOD, that problem
- goes away.
-
-
- Steve Kelley kelley@flowcyt.cyto.purdue.edu
-
- Purdue University Cytometry Laboratories (317) 494-8638 -- voice
- B050 Hansen LSRB, Purdue University (317) 494-0517 -- fax
- West Lafayette, Indiana, 47907
-