What is this error: invalid preprocessor command 'include_next' ?

What is this error: invalid preprocessor command 'include_next' ?

Hi,

I have a project that presents this error.  It is compiled for C99, on Intel 2017, update 4, under VS Community 2015.

The compiler seems to finish without complains all .C files, and after a while emit a lot of warning RC4011 and stops with: "fatal error RC1021: invalid preprocessor command 'include_next' "

Thanks for any help.

Armando

--------------------------------

C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(321): warning RC4011: identifier truncated to '_CRT_USE_WINAPI_FAMILY_DESKTOP_'
1>
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(321): warning RC4011: identifier truncated to '_CRT_USE_WINAPI_FAMILY_DESKTOP_'
1>
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(321): warning RC4011: identifier truncated to '_CRT_USE_WINAPI_FAMILY_DESKTOP_'
1>
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(321): warning RC4011: identifier truncated to '_CRT_USE_WINAPI_FAMILY_DESKTOP_'
1>
1>C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017\windows\compiler\include\stdint.h(13): fatal error RC1021: invalid preprocessor command 'include_next'
1>
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

 

#include_next is supported by the Intel compiler but not the Microsoft (Windows) compiler. 

This error is coming from the Microsoft compiler.

Are you sure you are using icl (the Intel compiler) and not cl (the Microsoft compiler)?

Judy

Dear Judith. Thanks for your hint.

I am sure that the compiler in use is ICL and not MS VC. There are several proves for that. The first is that the project was migrated from "Intel® C++ Composer XE 2013 SP1 Update 4 Integration for Microsoft* Visual Studio* 2008, Version 14.0.1295.2008" , and there was no problem. The second is that our code makes systematic use of VLA supported by C99 on ICL and not recognized by MS VC 2015 or 2017.

I noticed that the problem is triggered by repetitive inclusions of stdint.h, it is not clear for me under which conditions.

But I could avoid the error after guarding all inclusions of stdint.h  with:

#ifndef UINT32_MAX
  #include  <stdint.h>
#endif

The warning: "C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(321): warning RC4011: identifier truncated to '_CRT_USE_WINAPI_FAMILY_DESKTOP_'"   is not gone and I have no clue about that.

Thanks.

Armando

ICL is the active compiler for the project

Attachments: 

AttachmentSize
Downloadimage/jpeg catshell_use_icl.jpg130.67 KB

 

The diagnostic messages you are seeing, i.e:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(321): warning RC4011: identifier truncated to '_CRT_USE_WINAPI_FAMILY_DESKTOP_'"'

are not in the format produced by our compiler. We don't have "RC4011" messages. This is more evidence that you are using the Microsoft compiler.

Our warnings look like:

t.c(4): warning #118: a void function may not return a value

I realize you are not intentionally using the Microsoft compiler but it appears that at least at some point it is being called. Perhaps something went awry in the migration?

Judy

Dear Judy.

If I change the compiler to Visual C++, it generates hundreds of errors immediately because we have lot of Variable Length Arrays (VLA) and extensive use of "restrict", as in C99, and not VC style  "__restrict".  Additionally we prefer <mathimf.h>, not <math.h>.  So with MS VC the project never reaches the linker phase, it aborts almost at the beginning of compilation.

I am guessing:  This project has several resources files (.RC)  So, a resource compiler must be requested at some time. Is the MS VC called on that situation ?

Thanks for your attention.

Armando

 

Could be -- I'm not s MSVC++ expert.

So the question then is if you're using the MSVC resource compiler why is it using an include path that includes headers from Intel (i.e. C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017\windows\compiler\include\).

 

 

Dear Judith,

Thanks for your hint.

I found an include on one resource file that made use of stdio.h .  Removing that dependence, the warning vanished.

Regards,

Armando

Leave a Comment

Please sign in to add a comment. Not a member? Join today