<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 14/03/2024 à 19:27, Fengting Chen a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:PH0PR10MB7061515D707822F7FAF11CB093292@PH0PR10MB7061.namprd10.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator"
        content="Microsoft Word 15 (filtered medium)">
      <style>@font-face
        {font-family:PMingLiU;
        panose-1:2 2 5 0 0 0 0 0 0 0;}@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
        {font-family:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 1 6 1 0 1 1 1 1 1;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}div.WordSection1
        {page:WordSection1;}</style>
      <div class="WordSection1">
        <p class="MsoNormal"><span
            style="font-family:"Aptos",sans-serif">I included
            this fix but it doesn’t help. I was building the georaster
            driver as a plugin but the linker failed at building gdal
            library. So the fix doesn’t seem to be related to the
            problem.
          </span></p>
      </div>
    </blockquote>
    <p>You can't build the driver as a plugin with internal libjpeg.
      CMake should prevent you from doing that because of</p>
    <p><a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/blob/master/frmts/georaster/CMakeLists.txt#L6">https://github.com/OSGeo/gdal/blob/master/frmts/georaster/CMakeLists.txt#L6</a></p>
    <p>But I now remember (thanks git blame!) that during the defered
      driver loading RFC development, I found that the condition to
      check that was broken. This was fixed in
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/commit/adb0fd695253cf9fb91bee46309e6c66b25e8d65">https://github.com/OSGeo/gdal/commit/adb0fd695253cf9fb91bee46309e6c66b25e8d65</a><br>
    </p>
    <blockquote type="cite"
cite="mid:PH0PR10MB7061515D707822F7FAF11CB093292@PH0PR10MB7061.namprd10.prod.outlook.com">
      <div class="WordSection1">
        <p class="MsoNormal"><span
            style="font-family:"Aptos",sans-serif"><o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Aptos",sans-serif"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Aptos",sans-serif">Building
            Custom Rule C:/fechen/gdal-3.8.4/CMakeLists.txt<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Aptos",sans-serif">vsidataio.obj
            : error LNK2005: "void __cdecl jpeg_vsiio_src(struct
            jpeg_decompress_struct *,struct VSIVirtualHandle *)"<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Aptos",sans-serif">(?jpeg_vsiio_src@@YAXPEAUjpeg_decompress_struct@@PEAUVSIVirtualHandle@@@Z)
            already defined in vsidataio.obj
            [C:\fechen\gdal-3.8.4\build\GDAL.vcxproj]<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Aptos",sans-serif">vsidataio.obj
            : error LNK2005: "void __cdecl jpeg_vsiio_dest(struct
            jpeg_compress_struct *,struct VSIVirtualHandle *)"
(?jpeg_vsiio_dest@@YAXPEAUjpeg_compress_struct@@PEAUVSIVirtualHandle@@@Z)
            already defined in vsidataio.obj
            [C:\fechen\gdal-3.8.4\build\GDAL.vcxproj]<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Aptos",sans-serif">    
            Creating library C:/fechen/gdal-3.8.4/build/Debug/gdald.lib
            and object C:/fechen/gdal-3.8.4/build/Debug/gdald.exp<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Aptos",sans-serif">C:\fechen\gdal-3.8.4\build\Debug\gdald.dll
            : fatal error LNK1169: one or more multiply defined symbols
            found [C:\fechen\gdal-3.8.4\build\GDAL.vcxproj]          
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:"Aptos",sans-serif"><o:p> </o:p></span></p>
        <div id="mail-editor-reference-message-container">
          <div>
            <div
style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
              <p class="MsoNormal" style="margin-bottom:12.0pt"><b><span
style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">From:
                  </span></b><span
style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">Even
                  Rouault <a class="moz-txt-link-rfc2396E" href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a><br>
                  <b>Date: </b>Thursday, March 14, 2024 at 11:52</span><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"> </span><span
style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">AM<br>
                  <b>To: </b>Fengting Chen
                  <a class="moz-txt-link-rfc2396E" href="mailto:fengting.chen@oracle.com"><fengting.chen@oracle.com></a>,
                  <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
                  <a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev@lists.osgeo.org"><gdal-dev@lists.osgeo.org></a><br>
                  <b>Subject: </b>Re: [gdal-dev] FW: [External] : GDAL
                  3.8.4 build on windows failed at linking<o:p></o:p></span></p>
            </div>
            <p>Hi,<o:p></o:p></p>
            <p>possibly already fixed in master with commit <a
href="https://urldefense.com/v3/__https:/github.com/OSGeo/gdal/commit/849226ce1a9__;!!ACWV5N9M2RV99hQ!KbMOD2u6nEacIP2ix07m6Y00zYu21fPOi8h2u_p-cjBCRSh9U8hYhTmK3txq5tv2LAvFBFXNfErVwdiaD9U8YKKFUCjQ$"
                moz-do-not-send="true">
                https://github.com/OSGeo/gdal/commit/849226ce1a9</a><o:p></o:p></p>
            <p>Even<o:p></o:p></p>
            <div>
              <p class="MsoNormal">Le 14/03/2024 à 16:47, Fengting Chen
                a écrit :<o:p></o:p></p>
            </div>
            <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
              <div>
                <p class="MsoNormal"><span
                    style="font-family:"Aptos",sans-serif">After
                    upgrading the windows build environment to VS2022, I
                    got the following linker error:
                  </span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-family:"Aptos",sans-serif">vsidataio.obj
                    : error LNK2005: "void __cdecl jpeg_vsiio_src(struct
                    jpeg_decompress_struct *,struct VSIVirtualHandle *)"
(?jpeg_vsiio_src@@YAXPEAUjpeg_decompress_struct@@PEAUVSIVirtualHandle@@@Z)
                    already defined in vsidataio.obj
                    [C:\fechen\gdal-3.8.4\build\GDAL.vcxproj]</span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-family:"Aptos",sans-serif">vsidataio.obj
                    : error LNK2005: "void __cdecl
                    jpeg_vsiio_dest(struct jpeg_compress_struct *,struct
                    VSIVirtualHandle *)"
(?jpeg_vsiio_dest@@YAXPEAUjpeg_compress_struct@@PEAUVSIVirtualHandle@@@Z)
                    already defined in vsidataio.obj
                    [C:\fechen\gdal-3.8.4\build\GDAL.vcxproj]</span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-family:"Aptos",sans-serif">    
                    Creating library
                    C:/fechen/gdal-3.8.4/build/Debug/gdald.lib and
                    object C:/fechen/gdal-3.8.4/build/Debug/gdald.exp</span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-family:"Aptos",sans-serif">C:\fechen\gdal-3.8.4\build\Debug\gdald.dll
                    : fatal error LNK1169: one or more multiply defined
                    symbols found
                    [C:\fechen\gdal-3.8.4\build\GDAL.vcxproj]</span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-family:"Aptos",sans-serif">I
                    set “GDAL_USE_JPEG_INTERNAL”  with “ON”. Any
                    suggestions?</span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-family:"Aptos",sans-serif">Thanks!</span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                <div id="mail-editor-reference-message-container">
                  <div>
                    <div
style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
                      <p class="MsoNormal" style="margin-bottom:12.0pt"><b><span
style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">From:
                          </span></b><span
style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">Even
                          Rouault
                          <a href="mailto:even.rouault@spatialys.com"
                            moz-do-not-send="true"><even.rouault@spatialys.com></a><br>
                          <b>Date: </b>Tuesday, March 12, 2024 at 12:56</span><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"> </span><span
style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">PM<br>
                          <b>To: </b>Fengting Chen <a
                            href="mailto:fengting.chen@oracle.com"
                            moz-do-not-send="true"><fengting.chen@oracle.com></a>,
                          <a href="mailto:gdal-dev@lists.osgeo.org"
                            moz-do-not-send="true"
                            class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a>
                          <a href="mailto:gdal-dev@lists.osgeo.org"
                            moz-do-not-send="true">
                            <gdal-dev@lists.osgeo.org></a><br>
                          <b>Subject: </b>Re: [gdal-dev] FW: [External]
                          : GDAL 3.8.4 build on windows failed at
                          linking</span><o:p></o:p></p>
                    </div>
                    <p>Not the answer you'll probably want to hear, but:<o:p></o:p></p>
                    <p>- Use an up-to-date compiler<o:p></o:p></p>
                    <p>- Use package distributions like vcpkg or
                      conda-forge that already brings all the
                      dependencies "for free"<o:p></o:p></p>
                    <p>- It seems you mix builds of different compilers
                      (VS vs mingw). That's a bit asking for troubles
                      ;-)<o:p></o:p></p>
                    <div>
                      <p class="MsoNormal">Le 12/03/2024 à 17:48,
                        Fengting Chen via gdal-dev a écrit :<o:p></o:p></p>
                    </div>
                    <blockquote
                      style="margin-top:5.0pt;margin-bottom:5.0pt">
                      <div>
                        <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">Resend with more
                            information:
                          </span><o:p></o:p></p>
                        <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                        <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">I am trying to build
                            GDAL 3.8.4 on windows under VS2015. The
                            build failed at linking stage that a bunch
                            of external symbols not found, specifically
                            the symbols in libproj, libcurl. I checked
                            the dll library stub .lib for libproj and
                            libcurl using “dumpbin” and found the
                            symbols in the library a little different,
                            for example the linker error shows
                            “__imp__curl_slist_append” not found, the
                            symbol output from the “dumpbin” is
                             “__imp_curl_slist_append” . </span><o:p></o:p></p>
                        <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                        <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">Any idea how to fix
                            this?
                          </span><o:p></o:p></p>
                        <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                        <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">Thanks!</span><o:p></o:p></p>
                        <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                        <div
                          id="mail-editor-reference-message-container">
                          <div>
                            <div
style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
                              <p class="MsoNormal"
                                style="margin-bottom:12.0pt"><b><span
style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">From:
                                  </span></b><span
style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">gdal-dev
                                  <a
href="mailto:gdal-dev-bounces@lists.osgeo.org" moz-do-not-send="true"><gdal-dev-bounces@lists.osgeo.org></a>
                                  on behalf of Fengting Chen via
                                  gdal-dev
                                  <a
href="mailto:gdal-dev@lists.osgeo.org" moz-do-not-send="true"><gdal-dev@lists.osgeo.org></a><br>
                                  <b>Date: </b>Monday, March 11, 2024
                                  at 4:50</span><span
style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"> </span><span
style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">PM<br>
                                  <b>To: </b><a
href="mailto:gdal-dev@lists.osgeo.org" moz-do-not-send="true"
                                    class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a>
                                  <a
href="mailto:gdal-dev@lists.osgeo.org" moz-do-not-send="true"><gdal-dev@lists.osgeo.org></a><br>
                                  <b>Subject: </b>[External] :
                                  [gdal-dev] GDAL 3.8.4 build on windows
                                  failed at linking</span><o:p></o:p></p>
                            </div>
                            <div>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">GDAL 3.8.4 build on
                                  Windows from VS2015 x64 command
                                  prompt: “cmake –build .” throws the
                                  following error (there are more
                                  similar errors):
                                </span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">cpl_vsil_az.obj : error
                                  LNK2001: unresolved external symbol
                                  __imp__curl_slist_append
                                  [E:\gdal-3.8.4\build\GDAL.vcxproj]</span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">cmake options has:</span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">set
                                  (GDAL_USE_CURL                ON  
                                  CACHE  BOOL "" FORCE)</span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">set
                                  (CURL_INCLUDE_DIR            
                                  "E:/SDK/curl-8.6.0_1-win64-mingw/include"
                                  CACHE PATH "" FORCE)</span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">set
                                  (CURL_LIBRARY_RELEASE        
                                  "E:/SDK/curl-8.6.0_1-win64-mingw/bin/libcurl-x64.lib"
                                  CACHE FILEPATH "" FORCE)</span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">libcurl-x64.lib is the
                                  DLL stub. Using dumpbin on
                                  libcurl-x64.lib shows that
                                  “__imp_curl_slist_append” is
                                  available. But the linker error is
                                  “__imp__curl_slist_append” not found.
                                  There is an extra “_” in it. </span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">Any idea why this error
                                  occurred?
                                </span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif">Thanks!</span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                              <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif"> </span><o:p></o:p></p>
                            </div>
                          </div>
                        </div>
                      </div>
                      <p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
                      <pre>_______________________________________________<o:p></o:p></pre>
                      <pre>gdal-dev mailing list<o:p></o:p></pre>
                      <pre><a href="mailto:gdal-dev@lists.osgeo.org"
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><o:p></o:p></pre>
                      <pre><a
href="https://urldefense.com/v3/__https:/lists.osgeo.org/mailman/listinfo/gdal-dev__;!!ACWV5N9M2RV99hQ!N8ZTSFcueASfCUE2XGRgmOMaX6fq5SFf-Tq25Un9Kws27WD09uZjzbSDMeAzmhzOrmz0mgSpFItXVTdprbA3RxpGPNVk$"
                      moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></pre>
                    </blockquote>
                    <pre>-- <o:p></o:p></pre>
                    <pre><a
href="https://urldefense.com/v3/__http:/www.spatialys.com__;!!ACWV5N9M2RV99hQ!N8ZTSFcueASfCUE2XGRgmOMaX6fq5SFf-Tq25Un9Kws27WD09uZjzbSDMeAzmhzOrmz0mgSpFItXVTdprbA3R_bZl290$"
                    moz-do-not-send="true">http://www.spatialys.com</a><o:p></o:p></pre>
                    <pre>My software is free, but my time generally not.<o:p></o:p></pre>
                  </div>
                </div>
              </div>
            </blockquote>
            <pre>-- <o:p></o:p></pre>
            <pre><a
href="https://urldefense.com/v3/__http:/www.spatialys.com__;!!ACWV5N9M2RV99hQ!KbMOD2u6nEacIP2ix07m6Y00zYu21fPOi8h2u_p-cjBCRSh9U8hYhTmK3txq5tv2LAvFBFXNfErVwdiaD9U8YKzOL5Qh$"
            moz-do-not-send="true">http://www.spatialys.com</a><o:p></o:p></pre>
            <pre>My software is free, but my time generally not.<o:p></o:p></pre>
          </div>
        </div>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>