Click here to Skip to main content
15,913,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Why no boundry condition set for C++ Pin
Patrice T11-Jun-16 6:02
mvePatrice T11-Jun-16 6:02 
AnswerRe: Why no boundry condition set for C++ Pin
leon de boer11-Jun-16 22:53
leon de boer11-Jun-16 22:53 
AnswerRe: Why no boundry condition set for C++ Pin
enhzflep14-Jun-16 1:34
enhzflep14-Jun-16 1:34 
AnswerRe: Why no boundry condition set for C++ Pin
Maximilien14-Jun-16 10:25
Maximilien14-Jun-16 10:25 
QuestionConverting Fortran source to C++ Source Pin
manoharbalu9-Jun-16 1:58
manoharbalu9-Jun-16 1:58 
AnswerRe: Converting Fortran source to C++ Source Pin
Jochen Arndt9-Jun-16 2:30
professionalJochen Arndt9-Jun-16 2:30 
GeneralRe: Converting Fortran source to C++ Source Pin
manoharbalu9-Jun-16 2:52
manoharbalu9-Jun-16 2:52 
GeneralRe: Converting Fortran source to C++ Source Pin
Jochen Arndt9-Jun-16 3:27
professionalJochen Arndt9-Jun-16 3:27 
I don't know if it is possible.

When using an old Fortran compiler with a newer C/C++ project, the libraries must be build as static libraries.

It depends also on the dependencies of your Fortarn libraries. You can use the Dependency Walker (depends.exe) Home Page[^] to load your Fortran DLLs and check which other dependencies exist. If there are some, you might have problems because those might refer to quite old DLL versions.

You can check it using a small test project:

C++
#include <stdio.h>

// Link with library. Copy library to build path (debug / release),
//  specify full path here, or add path of libraray to project settings.
#pragma comment(lib, "fortran_library_name")

extern "C"
{
    // Functions exported by fortran_library_name and used in this program.
    // Note that function names may be all upper case.
    // The function name may be also exported with a leading underscore.
    // You can see the names in the DependencyWalker.
    void __stdcall some_fortran_lib_func1();

    // Another example with Fortran code
    // REAL*8 FUNCTION SOME_FORTRAN_LIB_FUNC2 (a, b)
    // REAL*8 a [VALUE]
    // REAL*8 b [REFERENCE]
    // b = SQRT(a)
    // SOME_FORTRAN_LIB_FUNC2 = a * a
    // END
    double __stdcall SOME_FORTRAN_LIB_FUNC2(double f, double *p);
}

int main()
{
    some_fortran_lib_func1();
    // Print result here if functions returns a value or modfies parameters 
    return 0;
}


Use the above code snippet to try first with a simple function (few parameters). If that works proceed with all functions declaring and testing them for correct results (I assume that most - if not all - are just doing some calculations).
GeneralRe: Converting Fortran source to C++ Source Pin
manoharbalu9-Jun-16 3:36
manoharbalu9-Jun-16 3:36 
GeneralRe: Converting Fortran source to C++ Source Pin
Jochen Arndt9-Jun-16 3:54
professionalJochen Arndt9-Jun-16 3:54 
GeneralRe: Converting Fortran source to C++ Source Pin
leon de boer9-Jun-16 4:21
leon de boer9-Jun-16 4:21 
GeneralRe: Converting Fortran source to C++ Source Pin
David A. Gray13-Jun-16 11:35
David A. Gray13-Jun-16 11:35 
AnswerRe: Converting Fortran source to C++ Source Pin
Richard MacCutchan9-Jun-16 3:42
mveRichard MacCutchan9-Jun-16 3:42 
AnswerRe: Converting Fortran source to C++ Source Pin
leon de boer9-Jun-16 4:10
leon de boer9-Jun-16 4:10 
QuestionC++ and Visual Studio help? Error messages etc.. Pin
User 125396568-Jun-16 8:19
User 125396568-Jun-16 8:19 
SuggestionRe: C++ and Visual Studio help? Error messages etc.. Pin
David Crow8-Jun-16 9:32
David Crow8-Jun-16 9:32 
AnswerRe: C++ and Visual Studio help? Error messages etc.. Pin
Richard MacCutchan8-Jun-16 20:53
mveRichard MacCutchan8-Jun-16 20:53 
AnswerRe: C++ and Visual Studio help? Error messages etc.. Pin
leon de boer8-Jun-16 21:57
leon de boer8-Jun-16 21:57 
GeneralRe: C++ and Visual Studio help? Error messages etc.. Pin
Richard MacCutchan8-Jun-16 22:26
mveRichard MacCutchan8-Jun-16 22:26 
QuestionMemory leak in VC++ 6.0 when store lots of objects in CArray,please help me! Pin
lostangels5-Jun-16 4:37
lostangels5-Jun-16 4:37 
AnswerRe: Memory leak in VC++ 6.0 when store lots of objects in CArray,please help me! Pin
Daniel Pfeffer5-Jun-16 21:39
professionalDaniel Pfeffer5-Jun-16 21:39 
AnswerRe: Memory leak in VC++ 6.0 when store lots of objects in CArray,please help me! Pin
Richard MacCutchan5-Jun-16 22:35
mveRichard MacCutchan5-Jun-16 22:35 
AnswerRe: Memory leak in VC++ 6.0 when store lots of objects in CArray,please help me! Pin
Victor Nijegorodov6-Jun-16 1:17
Victor Nijegorodov6-Jun-16 1:17 
AnswerRe: Memory leak in VC++ 6.0 when store lots of objects in CArray,please help me! Pin
leon de boer6-Jun-16 3:27
leon de boer6-Jun-16 3:27 
QuestionType checking Pin
Rahul Thengadi4-Jun-16 10:26
Rahul Thengadi4-Jun-16 10:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.