i'm using the included cd that came with my Deitel Deitel Third Edition C++ book.
Help / about tells me i'm using visual C++ 6.0

I'm trying to compile a piece of code i wrote in FORTRAN. The code runs and accepts changes to my namelist but does not compile any changes i make to the code. . . ?
the text is not shown in colors like i get when looking at c++ code. it's just black and white.

do i need a different version of developer studio?
is the one i have specifically designated for c++?

Dani AI

Generated

Two separate things are happening in this thread: syntax coloring (editor behavior) and actual compilation. and have already pointed toward those two areas; the concrete checks below distinguish them and give immediate, practical steps to confirm what’s wrong and to fix it.

First, verify you are editing the Fortran source, not a runtime input (your namelist). A namelist is an input file read at run time — changing it will not rebuild the executable. Confirm the file you edit has a Fortran extension (typical extensions: .f, .for, .f90) and that the IDE is saving the file you think it is. After saving the source, force a full rebuild and inspect the build/output window to see whether any compiler is being invoked and whether object/exe timestamps change.

If there is no Fortran compiler installed or the IDE doesn’t call one, compile on the command line to prove the source builds outside the IDE. Example commands (with gfortran):

gfortran source.f90 -o program.exe
gfortran --version

If the command-line compile succeeds, either use that workflow or integrate the compiler into the IDE by using a makefile project or an external-build step that calls your Fortran compiler. Commercial Fortran compilers also offer Visual Studio integration for some versions — that is an option if tight IDE integration is required.

For syntax highlighting, choose an editor or plugin that recognizes Fortran (many modern editors and IDEs do). If staying with Visual C++ 6, highlight behavior depends on file-extension mapping and installed add-ins; using a Fortran-aware editor (or a newer IDE with a Fortran extension) is the quickest way to get proper coloring while you handle compilation separately.

Checklist summary: confirm you’re editing source (not namelist), ensure file extension is correct, save and rebuild while watching build output, try a command-line compile to verify a compiler is present, then decide whether to integrate a Fortran compiler into the IDE or use an external editor/build workflow.

Recommended Answers

All 3 Replies

You cannot compile FORTAN code with a C++ compiler...:rolleyes:

in the past i use developer studio for both C++ and fortran.

I think free Crimson editor will colorize that FORTRAN code. But its only an IDE and not a compiler. You need to get a fortran compiler if you want to compile your programs into an executable file.

But here is a plugin for Visual Studio 2005.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.