Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

CIN error when compiling in vc++6.0

pls see my attachment! when i compile my programm, it tells me an error ? How can i solve it!!


--------------------Configuration: VI_name - Win32 Debug--------------------
Compiling...
VI_name.c
c:\cvi-project\vi_name.c(19) : fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.

VI_name.obj - 1 error(s), 0 warning(s)
Download All
0 Kudos
Message 1 of 2
(2,892 Views)
The problem is that your project settings specify that you are using a precompiled header (stdafx.h) in all of your source files, but your vi_name.c source file does not include a precompiled header. Further complicating the issue is that your precompiled header is a C++ file, but your vi_name.c file is a C file. This means that you cannot simply include your precompiled header (stdafx.h) in vi_name.c.

One option for solving this is to remove your precompiled header from your project - you probably don't need it. To do this, remove stdafx.h and stdafx.cpp from the project. Then go to Project>>Settings>>C/C++>>Category>>Precompiled Headers and choose Not using precompiled headers.

Another option is to disable precompiled headers only for vi_name.c. You do th
is in a manner similar to above, except that you right click on vi_name.c in File View and choose Settings to get to the file-specific settings.

David Rohacek
National Instruments
0 Kudos
Message 2 of 2
(2,892 Views)