Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

cvisupp.lib unresolved external symbol

I was using LabWindows/CVI 6.0, upgraded to 7.0
I compile code in Visual C++ 6.0
After installing 7.0, compiling and linking, now get error "cvisupp.lib (rtedetch.obj): error LNK2001: unresolved external symbol _imp_wsprintfA"
If I take the cvisupp.lib from CVI 6.0, copy into ..\CVI70\extlib (replacing CVI 7.0's version) the error goes away.
0 Kudos
Message 1 of 3
(3,252 Views)
Rich,

wsprintf is defined in user32.lib, which is a VC library. You need to check your project settings and make sure that you're linking to it.

I'm not sure why there was a change in behavior between CVI 6 and CVI 7. cvisupp.lib is a static library that consists of different modules. Each one of those modules is loaded if and only if there is a link-time dependency to anything in that module. My guess is that our internal dependencies changed in CVI 7, and as a result one of the modules that has a dependency on wsprintf (rtedetch.obj) is now being pulled into the link, and complaining if the wsprintf definition isn't there.

But the bottom line is that any CVI program that is being compiled in VC needs to link against the standard VC libraries, such a
s user32.lib. Was this project created by the Measurement Studio new project wizard, or was is a project that you created manually?

Luis
NI
Message 2 of 3
(3,252 Views)
Hi Luis, thanks for reply.

No, my project was not created by the project wizard. I've been kind of "stealing" and "borrowing" from other developers in my group.

In any case, in VC under project settings, I have added user32.lib to the list of object/library modules under the "link" tab. The program now compiles without error.

Thanks, Rich
0 Kudos
Message 3 of 3
(3,252 Views)