Catch-22

Catch-22

I'll appreciate anyone who takes the time to answer my question. It's more of a FORTRAN question than a CVF question.

The company I work for has 40+ FORTRAN executable routines (.EXE) that they shell to from a VB GUI. Approximately 30% of the code in the FORTRAN routines is common and we share those files in Visual Source Safe so bookkeeping isn't a huge problem.

I have taken several of the routines and turned them into DLLs. This was a satisfactory first step but you can imagine that the Public Declarations in the VB calling program are mounting. What I really want to do is to compile the common code into a "main" DLL to be called from the VB. I would like to compile the remaining source for each existing .EXE into .LIB files that could be added the main DLL but of course I can't. The routines in the main DLL are needed to compile the .LIBs. Originally, I had hoped that I could compile the .LIB files as part of a workgroup with the main DLL and have it find the routines it needs. No luck.

Again, thanks for any suggestions.
Don

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

| I would like to compile the remaining source for each
| existing .EXE into .LIB files that could be added the
| main DLL but of course I can't.

Um, I'm not sure why you can't -- .LIBs are allowed to have unresolved externals. Of course, when you combine "ordinary" LIBs and "stub" LIBs (which come from building DLLs) into an EXE or a DLL, then you may not have unresolved externals.

However, if (now I'm speculating) all or part of code is in MODULEs, .mod files that come from compiling have to be present when compiling USEing code. In that case, you'd have to specify path to "external" .mod files for each project in Project/Settings/Fortran/Preprocessor/Module path, or permanently in Tools/Options/Directories/Include files.

Jugoslav

Jugoslav www.xeffort.com

Thanks for the advice. I didn't think .LIB files should have a problem with unresolved externals. I didn't look hard enough at my errors to realize they were all related to information in the MODULES.

I haven't completely worked out the details but using the Tools/Options/Directories/Include to point the the .mod has gotten me started.

Thanks again.
Don

Login to leave a comment.