Mixed Language Programming - Watcom C++/Fortran ??? 
Author Message
 Mixed Language Programming - Watcom C++/Fortran ???

Hi!

Can anyone tell me if the Watcom products are any good for mixed language
programming? I want to call Fortran form C++ and C++ from Fortran. Is there
any support for MFC?

TIA

Richard Collins



Mon, 13 Dec 1999 03:00:00 GMT  
 Mixed Language Programming - Watcom C++/Fortran ???

   Yes they talk about it in the manuals -- (they also have a C++
compiler)- in fact I get the impression that they are more interested
in C++ (that is some things - e.g. "browse" in the IDE only work
for c++ programs ... mind you, I have absolutely bno idea what
"browse"  means -- and don't especially want to find out).
chris



Mon, 13 Dec 1999 03:00:00 GMT  
 Mixed Language Programming - Watcom C++/Fortran ???



Quote:
>Hi!

>Can anyone tell me if the Watcom products are any good for mixed language
>programming? I want to call Fortran form C++ and C++ from Fortran. Is there
>any support for MFC?

>TIA

>Richard Collins


This is second-hand, but I have been told that Watcom is only object-
compatible with itself, so you will need to use their compilers for both
languages. I guess that implies no MFC.

If you can use a DLL for your C++, you should have no problems provided
the compilers use the same calling convention (many compilers give you a
choice of which to use). It's then non-trivial to call a Fortran routine
in the executable from the C++, though.

Catherine.
--
Catherine Rees Lay



Mon, 13 Dec 1999 03:00:00 GMT  
 Mixed Language Programming - Watcom C++/Fortran ???

Quote:

> Hi!

> Can anyone tell me if the Watcom products are any good for mixed language
> programming? I want to call Fortran form C++ and C++ from Fortran. Is there
> any support for MFC?

> TIA

> Richard Collins


I've used Watcom 10.6 mixing C and Fortran without any problems. You
just use some pragmas and then include all source files in the IDE. The
de{*filter*} is good, integrating C and Fortran modules. You have to use the
same versions of the Watcom C/C++ and Fortran compilers though.

I haven't tried it with C++. The manual talks about mixed programming
between the C/C++ and Fortran compilers, but all examples are between C
and Fortran. There are a lot of options and pragmas for calling and
naming conventions, so I guess it should be possible to do it with
C++/Fortan also.

The C/C++ compiler supports MFC.

Newsgroups related to the Watcom compilers:
http://www.*-*-*.com/

Sybase homepage:
http://www.*-*-*.com/



Tue, 14 Dec 1999 03:00:00 GMT  
 Mixed Language Programming - Watcom C++/Fortran ???

Go for it.  I do it all the time.   I have programs with a C main,
fortran subs and C functions.

I have no experience with MFC.

Lynn McGuire



Quote:
> Hi!

> Can anyone tell me if the Watcom products are any good for mixed language
> programming? I want to call Fortran form C++ and C++ from Fortran. Is
there
> any support for MFC?

> TIA

> Richard Collins




Fri, 14 Jan 2000 03:00:00 GMT  
 Mixed Language Programming - Watcom C++/Fortran ???

Quote:

> > Hi!

> > Can anyone tell me if the Watcom products are any good for mixed
language
> > programming? I want to call Fortran form C++ and C++ from Fortran. Is
> > there any support for MFC?

> > Richard Collins


I don't know the Watcom products specifically. I have done mixed language
programming in C++ and Fortran using MS Visual C++ (versions 2.0, 4.0, 4.2)
and Fortran Powerstation. I will be using the new DEC Fortran compiler on
NT soon.

I think you might be interested in cppf77.zip - code and documentation for
how to
interface C++ and Fortran in a portable way:

"Mixed language programming using C++ and FORTRAN 77
A portable technique for Windows NT/95, UNIX and other systems
Version 1.1, 28-May-1997"

Have a look at http://home.sol.no/arnholm/ where you can download the file.

I would welcome any comments.

Carsten Arnholm



Sat, 15 Jan 2000 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Mixed Language Programming (C/C++ Fortran)

2. Mixed-Language PROBLEMS - MS FORTRAN 5.00/Watcom 10.6 and PDS 7.1

3. Mixed language programming with GNAT and GNU C++ compilers

4. C++ Fortran mixed programming

5. Problems about Mixed programming with C++ and Fortran

6. Mixed programming - FORTRAN/C/C++ on PC?

7. FORTRAN/C++ Mixed Programming on PC. Help!!

8. Mixed Case Function in Mixed-Language Programming

9. mixed-language programming (Calling Fortran routine from VC++)

10. Again - Mixed language programming Tcl/Tk and Fortran (Windows)

11. Mixed language programming Tcl/Tk and Fortran (Windows)

12. mixed-language program (VC call Fortran)

 

 
Powered by phpBB® Forum Software