Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Measurement studio wizard to convert CVI to VC

I used the measurement studio appwizard to convert a CVI project into VC++. When I compile the project, it gives me this error:
--------------------Configuration: myproject - Win32 Release--------------------
Copying UIR file to output folder...
The syntax of the command is incorrect.
Error executing c:\winnt\system32\cmd.exe.

myproject.exe - 1 error(s), 0 warning(s)


How can I solve this problem?
0 Kudos
Message 1 of 6
(3,277 Views)
Is this in Visual C++ 6.0 or Visual C++ .NET?

If it's Visual C++ 6.0, go to the Project->Settings menu item, expand the treeview on the left and select the .UIR file in the project, and select the custom build tab. Verify what's in the Command window and the Outputs window. Also, verify the $(InputPath). I'm not sure how to see it from within the environment, but if you look at the .dsp file in a text editor, you can search for InputPath and see what it's set to. Look at the path that InputPath is set to and verify that file is on your system at the specified path.

If it's Visual C++ .NET, right-click on the project in Solution Explorer, select Properties, go to the Build Events in the left path, and select Post-Build Event. Go the Command Line line
in the right-pane and press the "..." on the right side. Verify the command that's executed here. Look at the path to the .UIR file that's specified as the first argument and verify that file is on your system at the specified path.

If you're still having problems after checking this, please post another message to this thread with additional information. Thanks.

- Elton
0 Kudos
Message 2 of 6
(3,277 Views)
Elton,

Thanks for your help. Now I am able to compile the project, but I encounter some linkage errors between VC++ windows library and CVI utility library, the error looks like this:

Compiling...
DUFunctionLib.c
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2393) : warning C4028: formal parameter 1 different from declaration
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2393) : warning C4028: formal parameter 2 different from declaration
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2393) : warning C4142: benign redefinition of type
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2393) : error C2375: 'CVI_GetFileSize' : redefinition; different linkage
C:\Program Files\National Instruments\MeasurementStudio\CVI\include\utility.h(537) : see declaration of 'CVI_GetFileSize'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2492) : warning C4028: formal parameter 1 different from declaration
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2492) : warning C4028: formal parameter 2 different from declaration
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2492) : warning C4028: formal parameter 3 different from declaration
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2492) : warning C4028: formal parameter 4 different from declaration
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2492) : error C2375: 'CVI_GetFileTime' : redefinition; different linkage
C:\Program Files\National Instruments\MeasurementStudio\CVI\include\utility.h(538) : see declaration of 'CVI_GetFileTime'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2502) : warning C4028: formal parameter 1 different from declaration
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2502) : warning C4028: formal parameter 2 different from declaration
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2502) : warning C4028: formal parameter 3 different from declaration
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2502) : warning C4028: formal parameter 4 different from declaration
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2502) : error C2375: 'CVI_SetFileTime' : redefinition; different linkage
C:\Program Files\National Instruments\MeasurementStudio\CVI\include\utility.h(576) : see declaration of 'CVI_SetFileTime'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2809) : warning C4031: second formal parameter list longer than the first list
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2809) : warning C4028: formal parameter 1 different from declaration
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winbase.h(2809) : error C2371: 'CVI_Beep' : redefinition; different basic types
C:\Program Files\National Instruments\MeasurementStudio\CVI\include\utility.h(482) : see declaration of 'CVI_Beep'
.........
0 Kudos
Message 3 of 6
(3,277 Views)
It's hard to tell what's causing these link errors without seeing the project. Can you post a .zip of the project that's causing this problem?

- Elton
0 Kudos
Message 4 of 6
(3,277 Views)
The webpage gave me an upload error when I tried to post the project, it could be because the project is rather big (>2MB). I would still like to try to describe the problem. It seems like if I include the header files from NI and from windows, it would give me function/variables redefinition error. I tried to exclude , it would then give me unresolved external variables error on NI-DAQ functions that I use in the program.
0 Kudos
Message 5 of 6
(3,277 Views)
Did you delete the Visual C++ intermediate files before creating the .zip file? Namely, did you delete the Debug/Release directories and the .lwa, .ncb, and .opt files from the project directory? Your .zip file will be a lot smaller if you remove these files before creating the .zip. Thanks.

- Elton
0 Kudos
Message 6 of 6
(3,277 Views)