- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I read in your faq's an example of creating a Win32 console app, written in standard C, and linking fortran subroutines into it. I have successfully done this. My problem is, I need to link fortran subroutines into multithreaded, multiwindow, RichEdit C++ app. At this, I have repeated failed. I keep getting errors like:
testView.obj : error LNK2001: unresolved external symbol "void __cdecl foobar(void)" (?foobar@@YAXXZ)
I have tried everthing I can think of. I have even created a C wrapper, used 'extern "C"' on it, and called the fortran from it, as one of your faq responses suggests. That is what I did to get the error listed above. I just can't make it work. I am frustrated and at wits end. Any thoughts out there?
Bill Tangren
testView.obj : error LNK2001: unresolved external symbol "void __cdecl foobar(void)" (?foobar@@YAXXZ)
I have tried everthing I can think of. I have even created a C wrapper, used 'extern "C"' on it, and called the fortran from it, as one of your faq responses suggests. That is what I did to get the error listed above. I just can't make it work. I am frustrated and at wits end. Any thoughts out there?
Bill Tangren
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you got that error, you didn't use 'extern "C"
I note you're still using 6.0, which means you don't have the very nice C_CALLS_F sample we provided in 6.5. Given that, try this example and work from there. You don't have to use a DLL, as is mentioned in the text.
You may also want to look at the updated Programmer's Guide chapter on mixed-language programming. And last, now is a good time to upgrade to 6.6 - a special low upgrade price is in effect until November 30. See our web site for details.
Steve
I note you're still using 6.0, which means you don't have the very nice C_CALLS_F sample we provided in 6.5. Given that, try this example and work from there. You don't have to use a DLL, as is mentioned in the text.
You may also want to look at the updated Programmer's Guide chapter on mixed-language programming. And last, now is a good time to upgrade to 6.6 - a special low upgrade price is in effect until November 30. See our web site for details.
Steve

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