- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have installed Intel Visual Fortran (9.1) in Visual Studio 2002 IDE.
I wonder if it is possible to compile a Visual Fortran Project within which contains C/C++ source code.
Is there anyway to set up the compiler environment and let the compiler manager automatically detect C/C++ source code and choose visual C++ compiler to compiler without through static or dynamic link library?
By the way, I have managed to create a static library for C++ code and include it within the visual fortran project, where it can recognise the subroutines written in C/C++.
Thanks and looks forward to your reply.
I wonder if it is possible to compile a Visual Fortran Project within which contains C/C++ source code.
Is there anyway to set up the compiler environment and let the compiler manager automatically detect C/C++ source code and choose visual C++ compiler to compiler without through static or dynamic link library?
By the way, I have managed to create a static library for C++ code and include it within the visual fortran project, where it can recognise the subroutines written in C/C++.
Thanks and looks forward to your reply.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The samples use 11.1 project files and won't be openable by 9.1. Here's the general overview.
- First, configure Visual Studio for mixed-language development.
- Create the main program project, either Fortran or C++
- Add to the solution a new static library project of the other language
- Right click on the main program project, select Project Dependencies. Check the box for the static library
- In each project, look at the setting for runtime libraries and make sure that they are the same. In C++ it's under Code Generation, in Fortran, Libraries
- If the Fortran project is a static library, go to the Libraries property page and set "Disable default library search rules" to "No".
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a good starting point is the example directory.
from windows explorer browse toINTEL/Compiler/11.1/048/Samples/en_US/Fortran
(note the structure for 9.1 is similar/same, so simply browse around in the INTEL install directory)
(Also, back in 9.1 they may have had the examples un-zipped. with current release you need to un-zip the examples)
you'll find ZIP files, one titled Mixed Language
has solution with mixed language whcih does what you want/need
Also in the Fortran User Guide -> see Building Applications ->Programming with mixed languages
will also answere your questions about including libraries built in other languages.
from windows explorer browse to
(note the structure for 9.1 is similar/same, so simply browse around in the INTEL install directory)
(Also, back in 9.1 they may have had the examples un-zipped. with current release you need to un-zip the examples)
you'll find ZIP files, one titled Mixed Language
has solution with mixed language whcih does what you want/need
Also in the Fortran User Guide -> see Building Applications ->Programming with mixed languages
will also answere your questions about including libraries built in other languages.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9.1 doesn't have the samples.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
9.1 doesn't have the samples.
Could you be kind enough to send me the relevant sample zip files regarding to Mixed Languages?
Many thanks.
My email address is: junhonguk@gmail.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The samples use 11.1 project files and won't be openable by 9.1. Here's the general overview.
- First, configure Visual Studio for mixed-language development.
- Create the main program project, either Fortran or C++
- Add to the solution a new static library project of the other language
- Right click on the main program project, select Project Dependencies. Check the box for the static library
- In each project, look at the setting for runtime libraries and make sure that they are the same. In C++ it's under Code Generation, in Fortran, Libraries
- If the Fortran project is a static library, go to the Libraries property page and set "Disable default library search rules" to "No".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
The samples use 11.1 project files and won't be openable by 9.1. Here's the general overview.
- First, configure Visual Studio for mixed-language development.
- Create the main program project, either Fortran or C++
- Add to the solution a new static library project of the other language
- Right click on the main program project, select Project Dependencies. Check the box for the static library
- In each project, look at the setting for runtime libraries and make sure that they are the same. In C++ it's under Code Generation, in Fortran, Libraries
- If the Fortran project is a static library, go to the Libraries property page and set "Disable default library search rules" to "No".
Really appreciate for your gudiance.
It is very useful.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page