Click here to Skip to main content
15,909,827 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
I am going to interrupt here because Jochen may be misleading you, while not meaning to.

While he has shown a simple function with a double in out etc that is all nice and easy like he has indicated because they are all standards in both languages.

The thing that gets a bit fun is if your interface exchanges has string, multi dimensional arrays and variant records and the like which he hasn't mentioned. So do you have any pascal specific structures being exchanged, stuff your Pascal compiler would have known but C++ doesn't have. For example your pascal string the first byte is the length and then the string data follows with no ending #0 character so C++ will crash and die if you interface that as a C string, you have to marshal it. Any multi dimensional array will similarly be backwards row major in C++, column Major in Pascal/Fortran. Complex numbers are another thing that doesn't exist in C++ so if you have them on the interface they need special handling. If you have Pascal/Fortran variant records you will need structures with unions and packing control with C++ and a lot of marshalling. Probably look at the library interfaces and write out all the different types exchanged on the interface as a start.

So it's exactly like how you link it to Delphi but sometimes C++ will have no idea of the type you are exchanging, unlike Delphi which natively knows them as the languages share the type definitions.

There is also an added complication we need to talk about, your library files will be strictly ANSI and strictly 32 bit to link. If you select 64 bit complilation and unicode or wide character set on the C++ compiler you will not be able to link the old libraries, they would require what is referred to as a thunk interface which would have to be then written.
In vino veritas


modified 9-Jun-16 10:56am.

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 
AnswerRe: Type checking Pin
leon de boer4-Jun-16 21:03
leon de boer4-Jun-16 21:03 
Questionwhat is the difference between definition numeric value 0.0, .0, 0.? Pin
Member 125258022-Jun-16 22:23
Member 125258022-Jun-16 22:23 
AnswerRe: what is the difference between definition numeric value 0.0, .0, 0.? Pin
Richard MacCutchan2-Jun-16 23:40
mveRichard MacCutchan2-Jun-16 23:40 

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.