DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Linking error when using C++ DLL for writing TDM files

Solved!
Go to solution

I try to integrate TDM into my C++ code. Then I downloaded the package from the NI website "Integrating TDMS in Third-Party Products". I tested the the sample "writeFile.c". But a  linking error as following occurred:

1>Linking...

1>nilibddc.lib(implib.obj) : error LNK2019: unresolved external symbol __imp__wsprintfA referenced in function _LoadDLLIfNeeded

1>.\Debug/Test TDM.exe : fatal error LNK1120: 1 unresolved externals 

 

Can anyone help me out. Many thanks. 

0 Kudos
Message 1 of 5
(6,768 Views)
What compiler on what kind of platform/OS are you using?
0 Kudos
Message 2 of 5
(6,766 Views)

I am using VC++6.0. Today I also tried it with VC++2005, but failed.

 

Platform, Windows XP SP 2.

 

I googled a lot, but can not find a good answer.

 

 

Many Thanks!

 

P.S. At the beginning, there are two more linking errors:

 

nilibddc.lib(implib.obj) : error LNK2001: unresolved external symbol ___security_cookie

nilibddc.lib(implib.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4

Debug/Test TDM.exe : fatal error LNK1120: 2 unresolved externals 

 

After googling, I found I need a bufferoverflowu.lib. Then I imported it, it showed such error:

bufferoverflowU.lib(gs_report.obj) : fatal error LNK1103: debugging information corrupt; recompile module

Error executing link.exe. 

Message Edited by Kuo on 04-15-2010 10:14 AM
0 Kudos
Message 3 of 5
(6,764 Views)
Solution
Accepted by topic author Kuo

The MSDN say that it is defined in User32.lib

 

Hope that helps.

 

Andreas

0 Kudos
Message 4 of 5
(6,750 Views)

I migrated my code from VC++ 6 compiler to VC++ 2005. Then linking errors are gone.

nilibddc.lib(implib.obj) : error LNK2001: unresolved external symbol ___security_cookie

nilibddc.lib(implib.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4

 

P.S. "Read me" from NI says "The Microsoft 32-bit format is compatible with Microsoft Visual C version 6.0". But I tested the code with VC++6 professional with SP6 package and upgrade the SDK to the latest version that supports vc6. I still have the linking errors. My test seems prove that the dll does not support VC6. 

 

Message Edited by Kuo on 04-22-2010 05:03 AM
0 Kudos
Message 5 of 5
(6,692 Views)