Building LAMMPS with Visual Studio

Hi,

I would like to build LAMMPS using Visual Studio 2012.

Is there a guide or support on how to do this?

Thanks,
-Dan

See the src/WINDOWS README file.

None of the LAMMPS developers use Windows machine,
so this info may be outdated. There are pre-built Windows
exes provided on the download site …

Steve

i have one additional question and two more comments on this.

is there a specific reason that you want to build with visual c++ and
cannot use a prebuild executable?

See the src/WINDOWS README file.

but bear in mind that the files in this directory are contributed and
have not been updated in over two years. LAMMPS has been updated and
extended since then and thus you may need to adapt them.

None of the LAMMPS developers use Windows machine,
so this info may be outdated. There are pre-built Windows
exes provided on the download site ...

and at rpm.lammps.org/windows.html

in general, the "native" build system for LAMMPS assumes a unix/linux
like environment and the corresponding tools, so most of the times
windows executables are build using the cygwin build environment and
toolchain or with a cross-compiler on a linux machine. due to the
idiosyncrasies of windows and its occasional differences in the
calling conventions for posix library function calls, some additional
porting may be required. these issues don't show up with cygwin, since
it tries to provide a posix environment for windows, but i should
catch them with the mingw cross-compiler builds. yet, there may be new
issues.

axel.

Hi,

Thanks for the replies.

I will be contributing to the PQEQ package, so I would like to be able to add and edit files and compile. I would like to use Visual Studio, although I have LAMMPS built in a UNIX environment, if needed.

The /src/WINDOWS/README procedure was written for Visual Studio 2005 and include macros to generate .h and support for macros has been removed in Visual Studio 2012. This leads to an improper .h being generated with errors such as:

Error 7 error C1083: Cannot open include file: ‘…\compute_ti.h’: No such file or directory C:\Users\Dan\Desktop\lammps-try2\src\WINDOWS\settings\style_compute.h 44 1 LAMMPS

48 IntelliSense: cannot open source file “…\fix_deposit.h” c:\Users\Dan\Desktop\lammps-try2\src\WINDOWS\settings\style_fix.h 12 1 LAMMPS

At this point, I think it might be simpler to work in a UNIX environment, although if there is a setup that works for Visual Studio, I would be interested in using it.

Thanks again,
-Dan