- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(VS08, Fort 11.1.x) I have a couple of apps that use a Fortran library I wrote. The apps and library projectshave been recentlyconvertedfrom CVP. The lib appears in the Library Files section of the app project. But none of the functions in the libary are found when I link the main app. LNK2001 unresolved external symbol, and LNK2019 abound.
The Library Files section also includes lib files of various c++ DLLs I've written and the app doesn't complain about any of those functions. Of course I have interface modules for all of them.
Surely I'm doing something wrong here. Are interfaces now required for functions called in a library? Wouldn't think so, but...
The Library Files section also includes lib files of various c++ DLLs I've written and the app doesn't complain about any of those functions. Of course I have interface modules for all of them.
Surely I'm doing something wrong here. Are interfaces now required for functions called in a library? Wouldn't think so, but...
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK. It's a an option in the generated vfproj file on the VFFortranCompilerToolline which specifies
CallingConvention="callConventionCVF"
That's the culprit. Remove that and the compiler command line as seen in VS08 removes the /iface=CVF option--which I suppose is the same thing.
Now the routines in the static library are seen by the apps.
Whew. That's some hours of my life I won't see again.
CallingConvention="callConventionCVF"
That's the culprit. Remove that and the compiler command line as seen in VS08 removes the /iface=CVF option--which I suppose is the same thing.
Now the routines in the static library are seen by the apps.
Whew. That's some hours of my life I won't see again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The project conversion stuff is very handy... but I find it very annoying that it asks no questions, just converts the project using defaults. These defaults are indeed sensible for most frequently used settings, but if yours is not one of those, you might easily lose some hours of your life.
Apart from that calling convention default, the other one I find annoying is that it wants to assign C->Fortran translation using the custom build step for every "*.h" file it finds in the project, and I end up manually removing it for every one. The only one that really needs translating is called "resource.h" 99.9% of the time.
Apart from that calling convention default, the other one I find annoying is that it wants to assign C->Fortran translation using the custom build step for every "*.h" file it finds in the project, and I end up manually removing it for every one. The only one that really needs translating is called "resource.h" 99.9% of the time.
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