Closed Teslos closed 4 years ago
Hi Teslos
You are still working with OC, I have not seen you updated much of your iso-C interface for OC. As a matter of fact I have updated one of the examples on TQ4lib and I think I managed to eliminate both getkey and this "tinyfile_dialog" routines. I am a bit too old to bother with POSIX or not, in fact I thought I am using MinGW but I am not really sure from where I downloaded by last gfortran version. To me the website for MinGW seemed quite dead whereas there is some more recent MSYS2 which seems to be a replacement but I want to change as little as possible. But I would appreciate help for the C connection and possibly also with Python although that seems to quite far away. This f2py converter is evidently only for F77 code.
Best wishes
Bosse
I am not very familiar with anything else than Fortran and I try to ensure I can compile the new version of OC on WIndows, Linux and MacOS. I have collaborated interfacing OC with C or C++ for 2 commercial applications and if one could make a more general interface, also including Python, I would be happy to collaborate, mainly by avoiding creating problems with my Fortran code. I do not think I ca contribute discussing POSIX or related issues. For the moment I am mainly working on the code for step/map for interactive use, the OCASI/TQ interface has not gained much attention. I am also collaborating with someone developing a GUI (by creating OC macro files and writing python code) but again my main responsibility is not to mess up things so I prefer to stay with Fortran. But the getkey and tinyfile_dialogs were necessary for the interactive use of the Fortran code. For the use of OCASI/TQ they can be eliminated.
I am retired and work on OC on my personal PC at home so I have very little chance to test installing OC on various OS or configurations. Anyone are welcome to provide improved Makefiles/installment procedures/scripts. Such things are outside my knowledge, I want to concentrate on the thermodynamics.
Hi Teslos
I am sorry I am a bit slow but now I wonder why you are using getkey.c when you are running on Windows? Normally you should not compile and link that routine on Windows. I added it in order to have command line editing on Linux and it is only compiled if you use the Makefile. On WIndows I recommend using my homemade "linkmake" or "linkpara" routines to compile and link OC and they do not include getkey.c.
Can you explain why you want to use getkey.c? There is probably no problem for me to change to use the getch() you propose, is that normally available on linux systems?
Best wishes
Bosse
Hi Teslos
Using the Makefile on WIndows you can remove compiling getkey.c altogether and the -Dlixed option when compiling metlib4.F90
Best wishes
Bosse
As I have no responses I close this
Dear Bosse, The TQ4 and OC don't compile out of the box on the Windows machine with MinGW.
The problem is the
getkey.c
file which implements thegetch()
functionality using POSIX functions. However, MinGW doesn't implement POSIX functionality on windows. The workaround is a functiongetch()
defined inconio.h
which do the same thing asgetkey
but it is not POSIX compliant. I think it is implemented on many other systems but it is not guaranteed to exists as it is not POSIX :)I don't know if the additional complexity of adding flags to compile with MinGW is worth it. Do you plan to support the MinGW for the future release?
Best regards ∃t