Topic: linking to .lib library

I have C++ .lib files that I want to link to, for example: mylib.lib.  Can you show me how to link to it? Thanks

Re: linking to .lib library

If you're saying that your C++ .lib file was created using Microsoft tooling, then it almost certainly will not work directly with Simply Fortran.  C++ compilers perform compiler-specific "name mangling" when compiling that is not compatible across compilers on the same platform.

If, however, your C++ library is actually interfaced using extern "C", you probably have a much better chance of linking against the library.  There may still be some issues with both the name mangling and calling conventions used between compilers, but they can be figured out normally with some effort.

There is a section in Simply Fortran's documentation titled "Linking Libraries" that you should read.  It can be found by clicking "Contents..." in the help menu and navigating to Integrated Development Environment->Simply Fortran IDE->Using Simply Fortran->Linking Libraries.

It might help if you could provide a few more specifics as to what library you're attempting to link.  The easiest solution would be to rebuild your library using Simply Fortran's included C++ compiler, which would ensure compatibility.  Additionally, are you sure it's a C++ library and not simply a C library?  The difference is important when trying to link against libraries built using another compiler, as I pointed out earlier.

Let us know a few more details, and we might be able to get you running quickly.

Jeff Armstrong
Approximatrix, LLC