- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have a macro in an include ".inc" file in a file with extension *.F90.
#define MYASSERT(expr) call assert_impl(expr)
This is part of building some MPI-friendly assert code and I want to use a macro because this will eventuallypasss in__FILE__ and __LINE__. The #define is in the leftmost column
My problem is that, compiling with "-fpp" I get the error "Bad # preprocessor line" with a carat below pointing to the "d" in define. I have tried other variants like "-fpp:-free" or "-fpp:free" but the compiler does not correctly understand the flags (it gives me a message about "-fp" not being recognized.
Is there something more I can do? Am I getting the flags wrong?
Thanks,
Eli
#define MYASSERT(expr) call assert_impl(expr)
This is part of building some MPI-friendly assert code and I want to use a macro because this will eventuallypasss in__FILE__ and __LINE__. The #define is in the leftmost column
My problem is that, compiling with "-fpp" I get the error "Bad # preprocessor line" with a carat below pointing to the "d" in define. I have tried other variants like "-fpp:-free" or "-fpp:free" but the compiler does not correctly understand the flags (it gives me a message about "-fp" not being recognized.
Is there something more I can do? Am I getting the flags wrong?
Thanks,
Eli
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Eli,
Sometimes a typographical error or omission yields unexpected results.
Try this:
Create a new project.
In that project create an .inc file containing only that one #define listed above.
Create a PROGRAM (main) that includes the new .inc file.
Compile with -fpp.
If the error persists, then you have some probelm with the installed program (IVF and/or FPP)
If the problem goes away, then you likely have a problem with your current .inc file.
Likely unmatched #if...#endif
Jim Dempsey
Sometimes a typographical error or omission yields unexpected results.
Try this:
Create a new project.
In that project create an .inc file containing only that one #define listed above.
Create a PROGRAM (main) that includes the new .inc file.
Compile with -fpp.
If the error persists, then you have some probelm with the installed program (IVF and/or FPP)
If the problem goes away, then you likely have a problem with your current .inc file.
Likely unmatched #if...#endif
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim, this is the Linux/Mac forum, so IVF and projects aren't relevant.
I tried compiling this line on its own but got no error. Can you show us a small but complete source that demonstrates the problem?
I tried compiling this line on its own but got no error. Can you show us a small but complete source that demonstrates the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey, guys ... thanks for the answers. I saw the problem merely by prepping the tests you guys suggested. It was an include issue. I had accidentally used Fortran include syntax (include "x") instead of preprocessor (#include "x").
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page