building lammps as a shared library in windows

Hello,

I would like to know how to build LAMMPS as a shared library in windows.

Thanks,
Nava

Hello,

I would like to know how to build LAMMPS as a shared library in windows.

you cannot. well, not without some significant programming effort.

axel.

I don't know Windows, but the makefiles are in the
src dir to do it for Linux. If you can adapt them to
create a Windows *.DLL file instead of an *.so,
then take a look.

See src/Makefile.shlib.

Steve

I don't know Windows, but the makefiles are in the
src dir to do it for Linux. If you can adapt them to
create a Windows *.DLL file instead of an *.so,
then take a look.

sorry, but windows is different (in some sense better,
since this avoids pollution of objects linked against
shared libraries with symbols you did not intend to export):
all symbols are by default invisible. you have to explicitly
declare them to be exported. the name .dll vs. .so doesn't
really matter. e.g. the compiled plugins (i.e. shared objects)
in VMD for windows are also called .so and can be imported
just as well.

axel.

Thank you very much for your answer.
Just to be clear I would like to invoke lammps commands through a phyton code running on windows, is there any way to do it?

This is really a Python-on-Windows question, not a LAMMPS
question. If you had your own C file with a function in it,
and wanted to call the function from Python (on Windows), how would
you compile the C file to make it a shared lib that Python can
load? If you know how to do that, then just do the same thing with LAMMPS.
If you figure it out, please post the steps, as we'll include it in
the src/WINDOWS instructions.

Steve