error while compiling

Creating Tecplot binary data files

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

nipunarora088
Newbie
Posts: 4
Joined: Sun Mar 30, 2014 9:53 pm
Location: New delhi, India

error while compiling

Postby nipunarora088 » Thu May 01, 2014 2:32 am

I am using one of the sample C codes for creating binary files. I am using visual studio 2013 for compiling my code. I am getting the following errors

Error 1 error LNK2019: unresolved external symbol __imp__tecini112@28 referenced in function _main
Error 2 error LNK2019: unresolved external symbol __imp__teczne112@84 referenced in function _main
Error 3 error LNK2019: unresolved external symbol __imp__tecdat112@12 referenced in function _main
Error 4 error LNK2019: unresolved external symbol __imp__tecend112@0 referenced in function _main
Error 5 error LNK1120: 4 unresolved externals


Please help

Svetlana
Expert
Posts: 93
Joined: Sun Dec 22, 2013 3:08 pm
Location: Australia
Contact:

Re: error while compiling

Postby Svetlana » Thu May 01, 2014 3:03 pm

Take a look at http://stackoverflow.com/questions/3704374, it had various solutions. If you don't find them useful then could you please give a small example which reproduces the problem? (Comment lines until the error disappears or you comment them all; paste the remaining lines here.)

nipunarora088
Newbie
Posts: 4
Joined: Sun Mar 30, 2014 9:53 pm
Location: New delhi, India

Re: error while compiling

Postby nipunarora088 » Fri May 02, 2014 2:08 am

I guess there is some linking error. I am using the following steps:

1. Include "\tecplot360\include" directory which will include TECIO.h and MASTER.h header files
2. Add the path to tecio.lib and use tecio.lib.

a) Project --> Properties --> Linker-->General, add "..\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. Build the solution.

I then got the following errors

Error 1 error LNK2019: unresolved external symbol __imp__tecini112@28 referenced in function _main
Error 2 error LNK2019: unresolved external symbol __imp__teczne112@84 referenced in function _main
Error 3 error LNK2019: unresolved external symbol __imp__tecdat112@12 referenced in function _main
Error 4 error LNK2019: unresolved external symbol __imp__tecend112@0 referenced in function _main
Error 5 error LNK1120: 4 unresolved externals



Is the procedure followed for linking wrong? Please help.

straton
Jedi Master
Posts: 45
Joined: Tue Jul 26, 2011 7:38 am
Location: Bellevue, Washington
Contact:

Re: error while compiling

Postby straton » Mon May 05, 2014 10:57 am

Are you using the 32-bit or 64-bit library? Is your project 32-bit or 64-bit? They will need to match.


Also, is your compiler using leading underscores as "decorations"? You will need to remove the underscore decorations.

Ahab
Newbie
Posts: 3
Joined: Wed Mar 22, 2017 6:28 pm
Location: Beijing

Re: error while compiling

Postby Ahab » Wed Mar 22, 2017 6:34 pm

Have you solved this problem? I just got the same trouble when trying to produce binary data.

Ahab
Newbie
Posts: 3
Joined: Wed Mar 22, 2017 6:28 pm
Location: Beijing

Re: error while compiling

Postby Ahab » Wed Mar 22, 2017 8:01 pm

straton wrote:Are you using the 32-bit or 64-bit library? Is your project 32-bit or 64-bit? They will need to match.


Also, is your compiler using leading underscores as "decorations"? You will need to remove the underscore decorations.

--------------------------------------------------------------
Libraries of 32 bit and 64 bit really differ. Golden answer! Exactly solved the problem.


Return to “TecIO Library”

Who is online

Users browsing this forum: No registered users and 1 guest