unresolved external symbol, Visual Studio2010, Intel Fortran

Creating Tecplot binary data files

Moderators: davetaflin, salter, steve, jprenaud, straton, Chris Idso

kaijin0805
Newbie
Posts: 2
Joined: Wed Jul 10, 2013 5:13 pm
Location: United States

unresolved external symbol, Visual Studio2010, Intel Fortran

Postby kaijin0805 » Thu Jul 11, 2013 8:12 am

Dear All:

I have a problem with the linking the tecio.lib. I am trying to write a code to generate .plt file for tecplot. The first thing I am trying is making the simtest.f90 work.

I am using VS2010, Intel Fortran Compiler, Techplot2011R2 on a win 7 64 system.

What I did was:

1. create a project, add simtest.f90 (which will call tecini112, tecdat112, teczne112 and tecend112) as a source file and copy the tecio.f90 under the project folder and make sure include "simtest.f90" works. (I also have checked the names of subroutines in the tecio.f90 have a version 112, e.g. teczne112)

2. Add the path to tecio.lib and use tecio.lib. The file is saved under:
"C:\Program Files\Tecplot\Tecplot Chorus 2011 R2\tecplot360\bin"

a) Project --> Properties --> Linker-->General, add "C:\Program Files\Tecplot\Tecplot Chorus 2011 R2\tecplot360\bin" to the "Additional Library Directories";(this tells the linker where to search)
b) Project --> Properties --> Linker-->Input, add "tecio.lib" to the "Additional Dependencies";(this tells the linker which .lib will be used)

3. Click "Build".

Error msgs are:
error LNK2019: Unresolved external symbol _tecend112@0 referenced...
error LNk2019: Unresolved external symbol _tecdat112@12 referenced...
error LNk2019: Unresolved external symbol _teczne112@84 referenced...
error LNk2019: Unresolved external symbol _tecini112@28 referenced...

Anyone can help me out please. I tried everything I can but it still not working. (I thought this may be the fortran issue, so I even tried to create a new cpp project and use the simtest.c and use TECXXX.h, still the similar problem, unresolved external symbols).

Best,
Kai

kaijin0805
Newbie
Posts: 2
Joined: Wed Jul 10, 2013 5:13 pm
Location: United States

Re: unresolved external symbol, Visual Studio2010, Intel For

Postby kaijin0805 » Fri Jul 12, 2013 11:51 am

Dear All:

I fixed this problem by following suggestions from Tecplot support team. So, thanks to them.

The problem was that the compiler wants to add underscore to the function name. So, the error was: unresolved external "_tecini112"(note not tecini112 but _tecini112 )

One can solve this problem by using:
!MS$ATTRIBUTES STDCALL, DECORATE, ALIAS

Best,
Kai

rubenparedes
Newbie
Posts: 2
Joined: Thu Jul 17, 2014 11:04 am
Location: Cambridge

Re: unresolved external symbol, Visual Studio2010, Intel Fortran

Postby rubenparedes » Tue Mar 31, 2015 9:26 am

Hi Kaijin,

I am facing same problem in VS 2013. I am getting following errors:

Code: Select all

Error   5    error LNK2019: unresolved external symbol _tecdat142@12 referenced in function _MAIN__   simtest.obj   
Error   6    error LNK2019: unresolved external symbol _tecend142@0 referenced in function _MAIN__   simtest.obj   
Error   3    error LNK2019: unresolved external symbol _tecini142@32 referenced in function _MAIN__   simtest.obj   
Error   4    error LNK2019: unresolved external symbol _teczne142@84 referenced in function _MAIN__   simtest.obj


What do you mean with
One can solve this problem by using:
!MS$ATTRIBUTES STDCALL, DECORATE, ALIAS



where do I write it?

Thanks in advance,

Ruben


Return to “TecIO Library”

Who is online

Users browsing this forum: No registered users and 2 guests