- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to use Intel Fortran compiler to compile an application, which produce an error during configure when running the following command:
fpp -P conftest.c
And the conftest.c is the following:
# include <assert.h>
The error message is
assert.h(106): #error: #if: syntax error.
I tried both intel 2018 and 2020 compiler, and the same thing happened. Does anybody happen to know what may cause this and how to solve it? Many thanks!
Hai
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There should be no space between # and include. All fpp directives are # followed immediately by the keyword.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Steve for the suggestion. I deleted that space but got the same error message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found the problem is caused by the following line:
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L
fpp doesn't like the long integer 201112 expressed with a suffix “L”. If I deleted that "L", it then passes the test. But this is a system file and I should not change it.
Hai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why are you pre-processing C source code (the file has a .c extension) with a Fortran preprocessor?
If that file actually contains Fortran source code, why is it trying to include a C standard library header?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To add to what Ian said, you aren't using a Fortran compiler at all, just a Fortran-oriented preprocessor.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve and Ian,
Thanks for the reply. This is performed by a "configure" script, and I have no idea why it wants to do this. But since this test doesn't pass, the "configure" won't allow me to install this application.
Hai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's an error in the configure script, then. It should not be trying to use fpp on C sources.
![](/skins/images/C4F7392A5C68ACA60290C9576F107044/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page