Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support compiling code under Windows #276

Open
kartlee opened this issue Mar 22, 2024 · 1 comment
Open

Support compiling code under Windows #276

kartlee opened this issue Mar 22, 2024 · 1 comment

Comments

@kartlee
Copy link

kartlee commented Mar 22, 2024

The codebase doesn't compile under Windows, and while trying to see how far it goes with Visual Studio 2019 + Intel ifort 2022, I observed the following -

  • I had to set the following in main project of crest, and its subprojects

      `if fc_id == 'intel-cl'
          add_project_arguments(
              '-fpp',
              language: 'fortran',
          )
      endif`
    
  • At at the final stage while linking crest, I see the following
    [stdout] "xilink.exe" /MACHINE:x64 /OUT:crest.exe crest.exe.p/src_crest_main.f90.obj "/LIBPATH:E:/software/lib/Windows-common/ifort_2022.0.0/compiler/lib/intel64" "/LIBPATH:E:/software/lib/Windows-common/ifort_2017.1.040/mkl/lib/intel64" "/nologo" "/OPT:REF" "libcrest.a" "subprojects/tblite/libtblite.a" "subprojects/mctc-lib/libmctc-lib.a" "subprojects/dftd4/libdftd4.a" "subprojects/multicharge/libmulticharge.a" "subprojects/s-dftd3/libs-dftd3.a" "subprojects/toml-f/libtoml-f.a" "subprojects/gfn0/libgfn0.a" "subprojects/gfnff/libgfnff.a" "subprojects/lwoniom/liblwoniom.a" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "mkl_rt.lib" "/SUBSYSTEM:CONSOLE" [stdout] libcrest.a(src_iomod.F90.obj) : error LNK2019: unresolved external symbol setenv referenced in function IOMOD_mp_SETENV_STRING [stdout] libcrest.a(src_iomod.F90.obj) : error LNK2019: unresolved external symbol symlink referenced in function IOMOD_mp_SYLNK

Above posix symbols are not available in windows vc compiler, and so those bindings needs to be fixed.

Would it be possible to check at your end compiling under windows, and see if crest works?

@pprcht
Copy link
Contributor

pprcht commented Mar 23, 2024

We don't support or maintain a windows build at the moment. I don't think this will change anytime soon.
Since some functions like QCG run shell commands as a subprocess, I'm pretty sure it wouldn't run without issues anyways.

Furthermore, I started moving away from the meson build system a bit and focus more on CMake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants