Hi Dr. X,<div><br></div><div>I don&#39;t think it&#39;s a bug. I think you&#39;re just going to have to set those flags on an individual basis when you build against that version of SQL. Checking in your changes would prevent anyone from building Xdmf with /MT if they wanted to, which is a legitimate use case.</div>

<div><br></div><div>Personally, I would set these flags in the cmake-gui, under advanced, as needed.<br><br><div class="gmail_quote">On Wed, Sep 8, 2010 at 11:01 AM, Dr. X <span dir="ltr">&lt;<a href="mailto:xunlei@renci.org">xunlei@renci.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

  
    
  
  <div bgcolor="#ffffff" text="#000000">
    Hi Dave,<br>
    Here is what added to ParaView\Utilities\Xdmf2\CMakeLists.txt<br>
    ...<br>
    SET(CMAKE_C_FLAGS &quot;${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}&quot;)<br>
    <br>
    IF(WIN32)<br>
      SET(CMAKE_EXE_LINKER_FLAGS &quot;${CMAKE_EXE_LINKER_FLAGS} add
    /NODEFAULTLIB:libcmt&quot;)<br>
      SET(CMAKE_SHARED_LINKER_FLAGS &quot;${CMAKE_SHARED_LINKER_FLAGS} add
    /NODEFAULTLIB:libcmt&quot;)<br>
    ENDIF(WIN32)<br>
    ...<br>
    Would you please commit it to the main branch?<div class="im"><br>
    <br>
    Best,<br>
    x<br>
    <br>
    On 9/7/2010 10:17 AM, Dave Partyka wrote:
    </div><div><div></div><div class="h5"><blockquote type="cite">
      
      You can build dlls (/LD) and at the same time link the static
      version of the runtime (/MT). It makes it more convenient to
      distribute shared libraries without also needing to carry around
      the dynamic runtime dlls (msvcrtxx.dll).
      <div>
        <br>
      </div>
      <div>That said, your solution to set the excluded libraries in the
        project properties should work but can get trampled when CMake
        regenerates. A slightly better solution would be to use the
        /NODEFAULTLIB:&lt;library.lib&gt; link flags in CMake to exclude
        them will also work.</div>
      <div><br>
      </div>
      <div>CMAKE_EXE_LINKER_FLAGS add /NODEFAULTLIB:&lt;library.lib&gt;</div>
      <div>CMAKE_SHARED_LINKER_FLAGS add
        /NODEFAULTLIB:&lt;library.lib&gt;</div>
      <div><br>
      </div>
      <div>
        <br>
        <div class="gmail_quote">On Mon, Sep 6, 2010 at 5:33 PM, Dr. X <span dir="ltr">&lt;<a href="mailto:xunlei@renci.org" target="_blank">xunlei@renci.org</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
            <div bgcolor="#ffffff" text="#000000"> Hi Dave,<br>
              I am building against prebuilt MySQL (x64 essential)
              binary.<br>
              <a href="http://www.mysql.com/downloads/mysql/" target="_blank">http://www.mysql.com/downloads/mysql/</a><br>
              By examining the size of libmysql.lib, I am pretty sure it
              is a shared library.<br>
              <br>
              Best,<br>
              <font color="#888888"> x</font>
              <div>
                <div><br>
                  <br>
                  On 9/6/2010 5:26 PM, Dave Partyka wrote:
                  <blockquote type="cite"> So you&#39;re building ParaView
                    against your own build of sql, or a prebuilt binary
                    (via XDMF_USE_MYSQL)? Did you build it yourself? If
                    so, was it built with /MT? Can you provide any more
                    details so I can try and reproduce the errors?<br>
                    <br>
                    <div class="gmail_quote">On Mon, Sep 6, 2010 at 5:08
                      PM, Dr. X <span dir="ltr">&lt;<a href="mailto:xunlei@renci.org" target="_blank">xunlei@renci.org</a>&gt;</span>
                      wrote:<br>
                      <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
                        <div bgcolor="#ffffff" text="#000000"> Hi Dave,
                          <br>
                          I guess you were talking about the linking
                          error caused in Xdmf build, right? <br>
                          I did only have /MD and /MDd options in
                          ParaView CMake. The libcmt errors only happen
                          to Xdmf project.<br>
                          I will do a clean build again to verify.<br>
                          <br>
                          Best,<br>
                          <font color="#888888"> x</font>
                          <div>
                            <div><br>
                              <br>
                              <br>
                              On 9/6/2010 4:52 PM, Dave Partyka wrote:
                              <blockquote type="cite"> The link errors
                                indicate you&#39;re linking things built
                                with the static runtime (/MT) and the
                                dynamic runtime (/MD). By default CMake
                                uses the /MD Flags. Did you change them
                                to /MT? In either case you want them to
                                be the same for everything you&#39;re trying
                                to build.<br>
                                <br>
                                <div class="gmail_quote">On Mon, Sep 6,
                                  2010 at 4:46 PM, Dr. X <span dir="ltr">&lt;<a href="mailto:xunlei@renci.org" target="_blank">xunlei@renci.org</a>&gt;</span>
                                  wrote:<br>
                                  <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">  Hi All,<br>
                                    The default build of Xdmf.vcproj
                                    have the following bugs:<br>
====================================================<br>
                                    Errors:<br>
                                    Error 326 error C2146: syntax error
                                    : missing &#39;;&#39; before identifier &#39;fd&#39;<br>
                                    d:\mysql5.1\include\mysql_com.h 243
                                    Xdmf<br>
                                    Error 327 error C4430: missing type
                                    specifier - int assumed. Note: C++<br>
                                    does not support default-int
                                    d:\mysql5.1\include\mysql_com.h 243
                                    Xdmf<br>
                                    Error 328 error C4430: missing type
                                    specifier - int assumed. Note: C++<br>
                                    does not support default-int
                                    d:\mysql5.1\include\mysql_com.h 243
                                    Xdmf<br>
                                    Error 329 error C2065: &#39;SOCKET&#39; :
                                    undeclared identifier<br>
                                    d:\mysql5.1\include\mysql_com.h 427
                                    Xdmf<br>
                                    Error 330 error C2146: syntax error
                                    : missing &#39;)&#39; before identifier &#39;s&#39;<br>
                                    d:\mysql5.1\include\mysql_com.h 427
                                    Xdmf<br>
                                    Error 331 error C2059: syntax error
                                    : &#39;)&#39;<br>
                                    d:\mysql5.1\include\mysql_com.h 428
                                    Xdmf<br>
                                    <br>
                                    Fix:<br>
                                    Add the following lines in
                                    d:\mysql5.1\include\mysql_com.h<br>
                                    <br>
                                    #if defined(__WIN__)<br>
                                    #include &lt;WinSock2.h&gt;<br>
                                    #endif /* __WIN__ */<br>
====================================================<br>
                                    Errors:<br>
                                    Error 3 error LNK2005: _amsg_exit
                                    already defined in<br>
                                    MSVCRTD.lib(MSVCR90D.dll) LIBCMT.lib
                                    Xdmf<br>
                                    Error 4 error LNK2005: _initterm_e
                                    already defined in<br>
                                    MSVCRTD.lib(MSVCR90D.dll) LIBCMT.lib
                                    Xdmf<br>
                                    Error 5 error LNK2005: exit already
                                    defined in MSVCRTD.lib(MSVCR90D.dll)<br>
                                    LIBCMT.lib Xdmf<br>
                                    ...<br>
                                    <br>
                                    Fix:<br>
                                    Add &quot;libcmt&quot; in Xdmf Property Pages
                                    -&gt; Configuration Properties -&gt;<br>
                                    Linker -&gt; Input -&gt; Ignore
                                    Specific Library for both Debug and
                                    Release build.<br>
                                    <br>
                                    For the libcmt errors, how can I
                                    patch the corresponding
                                    CMakeLists.txt<br>
                                    file? Thanks a lot.<br>
                                    <br>
                                    Best,<br>
                                    x<br>
_______________________________________________<br>
                                    Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
                                    <br>
                                    Visit other Kitware open-source
                                    projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
                                    <br>
                                    Please keep messages on-topic and
                                    check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
                                    <br>
                                    Follow this link to
                                    subscribe/unsubscribe:<br>
                                    <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
                                  </blockquote>
                                </div>
                                <br>
                              </blockquote>
                              <br>
                            </div>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                    <br>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>