LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can LabWindows 7.1 run with Visual Studio .NET 2003?

I'm upgrading from Visual Studio 6.0 to .net for my C compiler.  Will LabWindows 7.1 support this?
Any problems I should know about?
Thanks!
Angie
0 Kudos
Message 1 of 8
(4,049 Views)

As CVI has its own compiler, it is not dependant on Visual Studio, so if you upgrade your Visual Studio, CVi continues to work as it did before, still using its own compiler.

 

Hope this answers your question.

0 Kudos
Message 2 of 8
(3,978 Views)
My experience is that CVI programs migrated to VS .NET 2003 will compile and run ok. However, CVI programs do not compile properly in VS .NET 2005 (the code model and run time library appear to be significantly different).
 
Maybe NI can clarify whether they intend to support VS 2005 in the future.
 
Martin.
--
Martin
Certified CVI Developer
0 Kudos
Message 3 of 8
(3,973 Views)
Hi msaxon

Were you trying to use CVI libraries from C++ in VS 2005? What kind of problems were you running into?

Bilal Durrani
NI
0 Kudos
Message 4 of 8
(3,969 Views)
Hi!

   Are you trying to compile a CVI project in VC++.NET? Or you refer to Measurement Studio?

   Anyway, any feedback on Measurement studio with VS 2005? (I refer especially to C#, even if I think it should be the same as for VB2005, as they're handled in the same way).

graziano
0 Kudos
Message 5 of 8
(3,958 Views)
Bilal:

I have a number of projects that started out as CVI projects, then were migrated to VC++ to get maximum speed. They build ok in both VC++ 6 and VC++ .NET 2003. Trying to build them in VC++ 2005 (they don't call it .NET anymore), I get two major problems:

  1. Source files that #include <windows.h> won't compile because of multiple errors (which appear to be macro redefinitions and typedef redefinitions), and
  2. If I include any CVI-generated .obj files (e.g. the UIR callback table .obj file), I get a linker error saying that it cannot find LIBC.lib.
These errors lead me to believe that the run-time libraries in 2005, and their header files, are substantially different to those in previous versions of VC++.

I must admit I haven't had a lot of time to look into these problems; it might be that all I need to do is change some build settings.

Martin.
--
Martin
Certified CVI Developer
0 Kudos
Message 6 of 8
(3,914 Views)
Hi msaxon

Do you have a sample project I would try building to test it out? I tried this on my end and it seemed to build ok. You're right that it might be a build setting of some kind. If you have a sample VS 2003 and the upgraded VS 2005 project that you would post here, that would help.

If you rather not post on the forums, let me know and I can provide an alternative.

Graziano - We are working on providing .NET 2.0 libraries for our .NET APIs in the future. The good thing is the .NET 2.0 framework allows hosting .NET 1.1 libraries so the current 1.1 libraries will work fine. I am referring here to the .NET GPIB, VISA, DAQmx and the Measurement Studio .NET libraries. MFC C++ libraries built for VS 2003 do not automatically work with VS 2005 because the symbols changed between the versions of MFC, which is something we have no control over. But this is something we are working on as well for future versions of Measurement Studio. Please feel free to post on the Measurement Studio forums if you run into any complications using VS 2005 with Measurement Studio .NET and C++ libraries. If you are using the CVI libraries, you can post on this forum. This KB elaborates some more on using the existing Measurement Studio .NET libraries with VS 2005.

I hope this helps. Thanks

Message Edited by bilalD on 01-20-2006 08:41 AM

Bilal Durrani
NI
0 Kudos
Message 7 of 8
(3,859 Views)
Hi msaxon

The issue with the libc.lib linker error has to do with the fact that VS 2005 no longer provides that library. Which is interesting considering an lib built using the previous versions of Visual Studio used to (by default) link with libc.lib, which is the single threaded C library. This is no longer the case. Now you must link against libcmt.lib (multi-threaded C libraries) or one of the others. The way to fix this would be specify the linker option /NODEFAULTLIB:libc.lib (Under project settings >> Configuration properties >> Linker >> Input). depending on how your project is setup, you might also need to add libcmt.lib as one of the additional dependencies in the link settings.

See this link for more information

http://msdn2.microsoft.com/en-us/library/abx4dbyh.aspx

I hope this helps
Bilal Durrani
NI
0 Kudos
Message 8 of 8
(3,825 Views)