Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
45 Views

XE 2020 problem using w-ode-a

XE 2013 would build my project, but XE 2020 is generating the following error while linking:

error LNK2001: unresolved external symbol _printf		libiode_ia32.lib(dodesol_mk52lfn.obj)		

The project uses the Intel® Ordinary Differential Equation Solver Library embodied in libiode_ia32.lib.  This related thread suggests adding #include <stdio.h> everywhere printf is called, but I obviously can't do that.  How can this be fixed?

What is the right way to port a project from XE 2013 to XE 2020?  I did it by merely copying the project folder from an old computer with visual studio 2010 & XE 2013 to a new one with visual studio 2019 and XE 2020, and then opened the .sln file in visual studio, and I'm playing wack-a-mole with multiple problems.

0 Kudos
7 Replies
Highlighted
45 Views

If _printf is being called, then this will require the appropriate C Runtime Library to be linked into your application. The reason that this function may be referenced is that you library libiode_ia32 likely was a C/C++ source that has a printf(....) somewhere.

https://software.intel.com/en-us/forums/intel-fortran-compiler/topic/806533

The above illustrates some ways, however, you may get by with simply adding the appropriate library from MS VC:

https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=vs-2019

Jim Dempsey

 

0 Kudos
Highlighted
New Contributor I
45 Views

Thanks for the reply.

With XE 2013 I didn't need to link in any C libraries.  Why would I need to do that with XE 2020?

What is the right way to port a project from XE 2013 to XE 2020?

0 Kudos
Highlighted
New Contributor I
45 Views

I solved this problem by adding legacy_stdio_definitions.lib to the list of Properties/Linker/Input/Additional Dependencies.

0 Kudos
Highlighted
Black Belt Retired Employee
45 Views

It's a Visual Studio difference, not a Fortran difference. 

0 Kudos
Highlighted
Black Belt
45 Views

Brian Murphy:

I wrote an answer to your  problems with Intel ODE Solver, but by mistake I answered in another of your threads:

https://software.intel.com/en-us/forums/intel-fortran-compiler/topic/849481#comment-1953796

Perhaps a moderator can move that response to this thread and delete this mea-culpa note

0 Kudos
Highlighted
New Contributor II
45 Views

I used this solution to get the Intel ODE Solver working -- I was doing a quick comparison to the NR in Fortran ODE. 

Is there anyway to update the libary with the problem so we do not have to use the legacy code?

I do not have a VS 2010 

Thanks

John

0 Kudos
Highlighted
Black Belt
45 Views

The Intel ODE Solver is not a supported product. 

Brian stated the solution in #4: add legacy_stdio_definitions.lib to the list of libraries for the linker to scan. You will not need VS10 if you follow that prescription.

0 Kudos