-
Notifications
You must be signed in to change notification settings - Fork 87
Procedure to query version of json-fortran #505
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
No we don't currently have that. We could add it though. I do like the idea. Currently the |
Maybe we can use preprocessing to include that file in a string parameter? |
Note that module variables are accessed at compile time not at runtime. Using the version support from 8a33d9b allows to check which version of json-fortran a project was compiled against, however not which version is currently used. For static linking those cases are identical, for dynamic linking those don't have to match. |
I don't fully understand the concern. Are you saying somebody might use a newer shared lib with an older set of the .mod files? I would say they shouldn't do that. |
Indeed, this is a realistic application as long as you allow setting |
I'm still not sure I get it. If you use a fortran library that is exporting modules, you need the library and the mod files. There's no guarantee that using a newer library with old mod files is going to work at all. Is this what you are doing? I would not recommend it! In any event, what about the function version I just committed? |
Thanks, looks great.
Got it, I'll be careful ;). I'm mostly using dynamic linking in package manager or environment manager controlled setups to avoid hours of recompiling dozens of interdependent libraries and executables. Of course I'm going for static linking if I can't have a package manager handling the version constraints and ensuring compatibility. |
Is there a way to query the version of json-fortran at runtime? Something along the lines of
Would be useful for projects which depend on json-fortran and want to report which version they are using at runtime.
The text was updated successfully, but these errors were encountered: