LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI 2013 release compilation

I'm migrating my projects to CVI 2013.

While I'm really pleased to improvements in the build process, I am experiencing some troubles when executing release compile.

My projects use Visual C 9.0 (from VS 2008) compiler and precompiled headers.

 

Using the default options set for Microsoft compiler of precompiled header file fails and I got this popup:

 

cvi2013.png

 

Compilation anyway proceeds and goes succesfully to the end.

 

After some investigation I've discovered that adding the /nologo switch to the "Compatibility Flags" field in the "Advanced Compiler Options" dialog, the spurious compiler warnings and the popup disappear.

 

 

After adding the /nologo switch, the compiler output is the following

 

Build Status (set.prj - Release)
pch.h - 3 warnings
1, 1 ', object file assumed
1, 1 ' ignored
1, 1 cl : Command line warning D9021 : no action performed
asb.c
about.c
asb_setup.c
asb_test.c
comm.c
comparms.c
dcb.c
dcb_setup.c
dcb_test.c
dsb.c
dsb_setup.c
dxb.c
dsb_test.c
dxb_setup.c
dxb_test.c
DXBenumerator.c
main.c
network.c
playsound.c
qcomm.c
queue.c
term.c
Link MS.exe
"d:\xxxxxxxxxxx\xxxxxx\xxxxxx\MS.exe" successfully created.
Build succeeded

 

The pch.h file contains only #include statements, and I don't think the problem is in my source...

 

 

 

 

Carlo A.
Megaris




0 Kudos
Message 1 of 7
(4,534 Views)

Hi Carlo,

 

i suppose that your project work fine in CVI 2012, right? To solve the problem can you send me the file and everythings i need to compile itself? I'll try to compile it in order to understand the problem. Thanks

 

 

Mario

0 Kudos
Message 2 of 7
(4,473 Views)

Hi Mario

sure, with 2012 SP1 no problems.

Attached to this message there is an ultra simple project that demonstrates the very same behaviour.

I'm pasting here the compilation output, I left all the default settings, so there are a lot a unuseful warning messages.

 

Build Status (demo_pch.prj - Release)
 cviincludes.h - 6 warnings
      1, 1   Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
      1, 1   Copyright (C) Microsoft Corporation.  All rights reserved.
      1, 1   cl /I"c:\program files (x86)\national instruments\cvi2013\include" /I"C:\Program Files (x86)\National Instruments\Shared\CVI\include" /I"C:\ProgramData\National Instruments\CVI2013\include" /I"C:\ProgramData\National Instruments\CVI\include" /I"c:\program files (x86)\national instruments\cvi2013\include\ansi" /I"C:\Program Files (x86)\IVI Foundation\IVI\Include" /I"C:\Program Files (x86)\IVI Foundation\VISA\winnt\include" /I"c:\program files (x86)\national instruments\cvi2013\sdk\include" /Ic:\Xxxx\dev_CVI_samples\demo_pch /I"c:\program files (x86)\national instruments\cvi2013\toolslib\activex\word" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\activex\excel" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\custctrl" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\custctrl\custsupp" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\cvirtsup" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\datasock" /I"c:\program file
      1, 1   ', object file assumed
      1, 1   ' ignored
      1, 1   cl : Command line warning D9021 : no action performed
 demo_pch.c - 57 warnings
      1, 1   Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
      1, 1   Copyright (C) Microsoft Corporation.  All rights reserved.
      1, 1   cl /I"c:\program files (x86)\national instruments\cvi2013\include" /I"C:\Program Files (x86)\National Instruments\Shared\CVI\include" /I"C:\ProgramData\National Instruments\CVI2013\include" /I"C:\ProgramData\National Instruments\CVI\include" /I"c:\program files (x86)\national instruments\cvi2013\include\ansi" /I"C:\Program Files (x86)\IVI Foundation\IVI\Include" /I"C:\Program Files (x86)\IVI Foundation\VISA\winnt\include" /I"c:\program files (x86)\national instruments\cvi2013\sdk\include" /Ic:Xxxx\dev_
      1, 1   CVI_samples\demo_pch /I"c:\program files (x86)\national instruments\cvi2013\toolslib\activex\word" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\activex\excel" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\custctrl" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\custctrl\custsupp" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\cvirtsup" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\datasock" /I"c:\program files (x86)\na
      1, 1   tional instruments\cvi2013\toolslib\daqUtil" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\printing" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\toolbox" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\reportgen" /I"c:\program files (x86)\national instruments\cvi2013\toolslib\localui" /I"c:\program files (x86)\national instruments\cvi2013\instr" /I"C:\Program Files (x86)\National Instruments\Shared\CVI\toolslib\custctrl" /I"C:\Program Files (x86)\Nation
      1, 1   al Instruments\Shared\CVI\toolslib\custctrl\custsupp" /I"C:\Program Files (x86)\National Instruments\Shared\CVI\instr" /I"C:\ProgramData\National Instruments\CVI2013\instr" /I"c:\Program Files (x86)\National Instruments\CVI2013\bin" /I"c:\ProgramData\National Instruments\CVI2013\bin" /I"c:\Program Files (x86)\National Instruments\Shared\CVI\Bin"
  "BaseTsd.h"(385,1)   (385) : warning C4305: 'type cast' : truncation from 'unsigned __int64' to 'void *'
  "BaseTsd.h"(403,1)   (403) : warning C4305: 'type cast' : truncation from '__int64' to 'void *'
  "WinNT.h"(1225,1)   (1225) : warning C4115: '_EXCEPTION_RECORD' : named type definition in parentheses
  "WinNT.h"(1227,1)   (1227) : warning C4115: '_CONTEXT' : named type definition in parentheses
  "WinBase.h"(249,1)   (249) : warning C4201: nonstandard extension used : nameless struct/union
  "WinBase.h"(251,1)   (251) : warning C4201: nonstandard extension used : nameless struct/union
  "WinBase.h"(691,1)   (691) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(692,1)   (692) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(693,1)   (693) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(694,1)   (694) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(695,1)   (695) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(696,1)   (696) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(697,1)   (697) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(698,1)   (698) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(721,1)   (721) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(722,1)   (722) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(723,1)   (723) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(724,1)   (724) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(725,1)   (725) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(726,1)   (726) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(727,1)   (727) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(728,1)   (728) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(729,1)   (729) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(730,1)   (730) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(731,1)   (731) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(732,1)   (732) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(733,1)   (733) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(734,1)   (734) : warning C4214: nonstandard extension used : bit field types other than int
  "WinBase.h"(776,1)   (776) : warning C4201: nonstandard extension used : nameless struct/union
  "WinBase.h"(777,1)   (777) : warning C4201: nonstandard extension used : nameless struct/union
  "WinBase.h"(3199,1)   (3199) : warning C4201: nonstandard extension used : nameless struct/union
  "WinGDI.h"(1948,1)   (1948) : warning C4201: nonstandard extension used : nameless struct/union
  "WinGDI.h"(1954,1)   (1954) : warning C4201: nonstandard extension used : nameless struct/union
  "WinGDI.h"(1955,1)   (1955) : warning C4201: nonstandard extension used : nameless struct/union
  "WinGDI.h"(1969,1)   (1969) : warning C4201: nonstandard extension used : nameless struct/union
  "WinGDI.h"(2002,1)   (2002) : warning C4201: nonstandard extension used : nameless struct/union
  "WinGDI.h"(2008,1)   (2008) : warning C4201: nonstandard extension used : nameless struct/union
  "WinGDI.h"(2009,1)   (2009) : warning C4201: nonstandard extension used : nameless struct/union
  "WinGDI.h"(2023,1)   (2023) : warning C4201: nonstandard extension used : nameless struct/union
  "WinUser.h"(995,1)   (995) : warning C4201: nonstandard extension used : nameless struct/union
  "WinUser.h"(5338,1)   (5338) : warning C4201: nonstandard extension used : nameless struct/union
  "WinUser.h"(11453,1)   (11453) : warning C4201: nonstandard extension used : nameless struct/union
  "WinUser.h"(11458,1)   (11458) : warning C4201: nonstandard extension used : nameless struct/union
  "WinUser.h"(12503,1)   (12503) : warning C4201: nonstandard extension used : nameless struct/union
  "WinUser.h"(12504,1)   (12504) : warning C4201: nonstandard extension used : nameless struct/union
  "WinUser.h"(12706,1)   (12706) : warning C4201: nonstandard extension used : nameless struct/union
  39, 1   (39) : warning C4100: 'argc' : unreferenced formal parameter
  63, 1   (63) : warning C4100: 'eventData2' : unreferenced formal parameter
  63, 1   (63) : warning C4100: 'eventData1' : unreferenced formal parameter
  62, 1   (62) : warning C4100: 'callbackData' : unreferenced formal parameter
  62, 1   (62) : warning C4100: 'panel' : unreferenced formal parameter
 Link demo_pch.exe
 "c:\Xxxx\dev_CVI_samples\demo_pch\demo_pch.exe" successfully created.
Build succeeded.

 

 

Carlo A.
Megaris




0 Kudos
Message 3 of 7
(4,388 Views)

Hi Carlox,

 

did you check that the selected entry in the ring control 'Compiler for Release Configuration' has valid settings and a green checkmark? It happened to me earlier (although I was using clang as an external compiler) and turned out to be related to some path names that needed to be adjusted.

0 Kudos
Message 4 of 7
(4,384 Views)

Wolfgang, yes sure it's all ok, to be safe I've just checked in the "advanced" panel, and paths are pointing to correct directories.

BTW, I've checked the very same project changing the compiler to Clang, and it works perfectly:

 

Build Status (demo_pch.prj - Release)
 cviincludes.h
 demo_pch.c
 Link demo_pch.exe
 "c:\Xxxx\dev_CVI_samples\demo_pch\demo_pch.exe" successfully created.
Build succeeded.

 

Carlo A.
Megaris




0 Kudos
Message 5 of 7
(4,378 Views)

From what I saw with your example, both the error dialog and the warnings are innocuous. The build completes successfully if the /nologo flag is used. Please let me know if you are noticing a consequence of these warnings.

 

Otherwise, I have filed bug report 426261 and 426262 and we will attempt to resolve these issues in a future version.

National Instruments
0 Kudos
Message 6 of 7
(4,281 Views)

Yes, you're absolutely right. Compilation is - after all - successful.

 

What I was trying to point out was the CVI bad behaviour.

After several tests, my feeling is that it tries to compile the .PCH file header without using the option for it (/Yc for Microsoft compiler).

While it compiles "ordinary" .c files, it does not use the option to tell to the compiler to use the precompiled file (/Yu for MS), as well.

I searched for these switches in the .BAT files left in the cvibuild folder and I don't found evidence of their presence.

 

My projects include windows.h header, so they are particularly sensitive to the speedup achieved by using precompiled headers.

 

 

 

 

 

 

Carlo A.
Megaris




0 Kudos
Message 7 of 7
(4,272 Views)