Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29282 Discussions

Using Makefile and Visual Studio with Intel Visual Fortran Compiler

lccostajr
Beginner
2,490 Views

I have a Makefile that I use to build my application in both Windows and Linux. All complex project- and platform-related stuff are already dealt in this Makefile.Today, I use a common editor to code and call GNU make from command line. Now I am considering to move to Microsoft Visual Studio 2010. I already use MSVS2010 when debuging using a not-configured Intel Visual Fortran Empty Project with my files.I don't want to duplicate my work configuring a new Visual Studio project and I want to use the Makefile instead.Is there a way to do it with MSVS2010? Or, is there any other better way to keep the configuration at one place "usable" from Windows and Linux?

0 Kudos
1 Reply
Steven_L_Intel1
Employee
2,490 Views
I don't quite understand what you are asking here.  You can, of course, continue to use a makefile to build the application.  Are you asking how to debug it in VS2010 without creating a VS project that duplicates the makefile?

Here's how to debug a Fortran application built outside Visual Studio:

  1. Compile and link the sources with the /debug option
  2. In Visual Studio, create a new empty Fortran Console Application project
  3. Right click on the project and select Properties. On the Debugging property page, replace the value for Command with the full path of the executable file.  Specify values for Command Arguments and Working Directory if you want.
  4. Add to the project the source file you want to set a breakpoint in, such as the main program.  Open the source file and click in the left margin where you want the breakpoint set.  Repeat as required.
  5. Start debugging (F5 or Debug > Start Debugging).  If you get a warning that the project needs to be rebuilt, dismiss it.

You can now save this project/solution and use it to debug the program in the future. It will preserve the breakpoints you have set.

0 Kudos
Reply