- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I try to compile software, which was developed in Linux, for Windows. It compiles correctly in Linux. The software contains various preprocessor variables.
An example from the original source code is:
#if (_DP==0)
use iso_fortran_env,only:output_unit,int32,int64,real32,real64,wp=>real32
#else
use iso_fortran_env,only:output_unit,int32,int64,real32,real64,wp=>real64
#endif
The command line in Visual Studio IDE (Microsoft Visual Studio Community 2022 (64-bit);
Version 17.0.5), which summarises my settings, is:
/nologo /debug:full /Od /fpp /DDP /DPARDISO /DSPAINV /warn:interfaces /module:"x64\Debug\\" /object:"x64\Debug\\" /Fd"x64\Debug\vc170.pdb" /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /Qmkl:parallel /c
The i90 file gives:
use iso_fortran_env,only:output_unit,int32,int64,real32,real64,wp=>real32
So, despite using "/fpp /DDP", fpp evaluates the original source code with DP=0. I also tried /DDP=1, but no difference. There are no #DEFINE preprocessor statements in the source code. In fact, all preprocessor variables are taken as 0.
Any suggestions what I am doing wrong?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you should use: -D_DP instead of -DDP - see the #if line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. Embarassingly obvious, but I did not see it. And yes, it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page