Hi all,<br><br>   I am trying to compile with a debug version of Petsc with -MDd options using visual studio c++ 2008. The following options are used.<br><br>./config/configure.py --with-cc=&#39;cl&#39; --with-fc=0  --with-cxx=&#39;cl&#39; --with-mpi=0 --with-debugging=1 --download-f2cblaslapack=/path/to/f2cblaslapack-3.1.1.q.tar.gz -CFLAGS=&#39;-MDd -wd4996&#39; -CXXFLAGS=&#39;-MDd -wd4996&#39;<br>
<br>But it seems that f2cblaslapack does not recognize &quot;-MDd&quot; completely. Some files are still compiled with &#39;-MD&#39; instead of &quot;-MDd&quot;. This will lead to a problem that not all libraries are linked with the same MS C library. I think it may be caused by the variable &quot;CNOOPT&quot; is not set properly in config/BuildSystem/config/packages/f2cblaslapack.py and config/BuildSystem/config/packages/BlasLapack.py. Only &#39;-MD&#39; is present there. See<br>
<br>  def getWindowsNonOptFlags(self,cflags):<br>    for flag in [&#39;-MT&#39;,&#39;-MTd&#39;,&#39;-MD&#39;,&#39;-threads&#39;]:<br>      if cflags.find(flag) &gt;=0: return flag<br>    return &#39;&#39;<br><br>If I substitute &#39;-MD&#39; with &#39;-MDd&#39;, then it works. But this will lead to problem when &#39;-MD&#39; is preferred. <br>
<br>I am wondering if anyone can fix this problem.<br><br>Thanks,<br>Mengda<br><br>