I need to use preprocessor directives in a program that I’m working. I must select between PIO lib and SMIOL lib for IO writes. I put a #ifdef - #endif inside my code to choose one of them. But the fpm build don’t recognize the directive -DPIO that i am using. Then I did a simple code, based on fpm example. I put the #ifdef to test the code. The main code are:
program main use teste_fpm, only: say_hello implicit none print *, 'testando o ofdef...' #ifdef HELLO call say_hello() #endif #ifdef BANANA print *,'banana' #endif end program main
and the rest of code are the same of fpm example. To compile I used:
without the flag “-DHELLO”, and the program pass inside the ifdef.
How can I do to use DEFINE (preprocessing) directives?