<div dir="ltr">Of course, this is what I did (I'm building it for MSVC 2010, but it should be similar for other versions):<div><br></div><div> - call `setenv.cmd` (or `vcvarsall`) to configure the compiler environment (this should be configured at all steps)</div><div> - enter Cygwin, call `configure` normally from inside Cygwin, adding `--with-shared-libraries=1` (the output says "shared libraries: disabled", but no problem)</div><div> - modify PETScConfig.cmake to replace `/cygdrive/c/` with `C:/`</div><div> - if needed, change `iomp5md` to `libiomp5md`</div><div> - add `add_definitions(-DPETSC_USE_SHARED_LIBRARIES=1)` after the project line of CMakeLists.txt</div><div> - outside of Cygwin, call cmake like this, from inside the "arch-mswin-c-opt" directory:</div><div><br></div><div> cmake .. -G "Visual Studio 10 2010 Win64" -DPETSC_CMAKE_ARCH=arch-mswin-c-opt -DCMAKE_C_FLAGS="-wd4996" -DBUILD_SHARED_LIBS:BOOL=ON<br></div><div><br></div><div> - build the generated PETSc.sln from inside Visual Studio</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 5:27 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
> On Mar 16, 2016, at 3:22 PM, E. Tadeu <<a href="mailto:e.tadeu@gmail.com" target="_blank">e.tadeu@gmail.com</a>> wrote:<br>
><br>
> Thanks Satish,<br>
><br>
> Just to let you know, with a few minor modifications and extra parameters, I've managed to build it using configure under Cygwin, and then, outside cygwin, running non-cygwin cmake inside the "arch-..." folder, targeting MSVC.<br>
<br>
</span> Awesome, can you send any changes you needed to make to PETSc so other users can benefit?<br>
<span><font color="#888888"><br>
Barry<br>
</font></span><div><div><br>
><br>
><br>
> On Mon, Mar 14, 2016 at 6:31 PM, Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br>
> you could try precompiled petsc from<br>
> <a href="http://www.msic.ch/Downloads/Software" rel="noreferrer" target="_blank">http://www.msic.ch/Downloads/Software</a><br>
> [its old 3.5 version though]<br>
><br>
> We don't have any changes wrt .dlls or cmake on windows..<br>
><br>
> Satish<br>
><br>
> On Mon, 14 Mar 2016, E. Tadeu wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > What is the current status of building PETSc as a shared library on<br>
> > Windows? It seems non-trivial: `--with-shared-libraries=1` won't work,<br>
> > since Cygwin's `ld` fails, and `win32fe` also fails.<br>
> ><br>
> > Also, what is the status of building PETSc with CMake on Windows? Perhaps<br>
> > through using CMake it would be easier to generate the .DLL's, but I<br>
> > couldn't find documentation on how to do this.<br>
> ><br>
> ><br>
> > Thanks!<br>
> > Edson<br>
> ><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div></div>