Closed joyo44 closed 4 years ago
Hi John, thanks for the feedback and the issue!
Unfortunately I do not have LINUX so it's a little difficult for me to analyze. Maybe you can support? It seems that the precompiler directive "#ifdef UNIX" does not work... Did you use the make file from this repository? Here I added the compiler flag "-cpp" to activate the pre compiler. I'm not sure if the directive "#ifdef UNIX" also works in an LINUX environment? It should ...
Thank you and regards Jochen
... forgot to say:
Sorry! But this should be a minor thing to implement if you (somebody) could test it.
Hi Jochen,
sorry, i have no experience with compiling for mixed OS.
Normally Gfortran should support the derictives linux, linux, unix and unix. I tried that and inluded an false statement behind the '#ifdef' and the compiler always jumped to WINDOWS and popped up with an error. Then I compiled os_utils allone and got the warning Illegal preprocessor directive - very strange.
I have no idea, what's going on - may be Daniel Prosser can help.
Kind regards and stay healthy.
John
Hi John, ... I think a got a solution (maybe not the best). Add an additional gfortran compiler option to set the precompiler macro: "-dUNIX=1". You'll find it in the updated CMakeLists.txt. I'll provide later the colored output for UNIX/LINUX. It would be great, if could test it. Thanks! And regards - and yes, stay healthy! Jochen
Hi Jochen, that works! I run an example without any problems.
Sure I can test the changes for LINUX.
Regards, John
Hi John, with the lastest commit there should be some color in the show_details mode like this
Thanks for your support!
Jochen
Hi Jochen, looks like your latest commit works:
John
... uff! ;-) John, thanks again. If you have any further suggestions please go ahead...
Hi Jochen, i cloned the repository and tried to compile under Linux. Failed with some undefined references:
CMakeFiles/MYOBJLIB.dir/src/fortran/os_util.f90.o: In function
__os_util_MOD_print_colored_windows': os_util.f90:(.text+0x5d): undefined reference to
GetStdHandle' os_util.f90:(.text+0x6b): undefined reference toGetConsoleScreenBufferInfo' os_util.f90:(.text+0x7a): undefined reference to
SetConsoleTextAttribute' os_util.f90:(.text+0xfc): undefined reference to `SetConsoleTextAttribute' collect2: error: ld returned 1 exit statusBTW, huge improvements you made to Xoptfoil, thanks.
John