Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28459 Discussions

Linking Mathgl Library to Intel Fortran solution in Visual Studio

Pierre_Archambeau
433 Views

Hello,

Mathgl is a C++ open source library that can be used to plot results directly in calculation (see http://mathgl.sourceforge.net/doc_en/Main.html).

There are examples (https://groups.google.com/forum/#!topic/mathgl/hMH3_U3XAHI) for coupling Fortran/Mathgl and GTK. The projects are as Code::Blocks form and use gfortran to compile. All is fine with these tools.

When I want to implement a similar solution in Visual Studio, I don't know how to link the dll in my project. I have an error LNK2019: unresolved external symbol.

I'm a newbie in coupling Fortran and C++ dll. Gfortran seems to do the job with the -lmgl option.

Can anyone tell me the proper way to do the same in Visual Studio?

Thank you

Pierre

0 Kudos
1 Reply
Steven_L_Intel1
Employee
433 Views

The key you are missing is that you don't link to a DLL - you link to the export library, a .lib, created when the DLL was built.

0 Kudos
Reply