<html><head><style type="text/css">.style1 {font-family: "Times New Roman";}</style></head><body><div dir="ltr">Also worth noting that this appears in the console output:<div><br></div><div>-- Enabled drivers and features and found dependency packages<br>-- The following features have been enabled:<br><snip ...><br> * ogr_SHAPE, ESRI shape-file<br></div><div><br></div><div>Derek Newhall</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 20, 2023 at 9:01 PM Derek Newhall <<a href="mailto:dnewhall@carlsonsw.com">dnewhall@carlsonsw.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<br><br>We've just migrated from GDAL 3.5.1 to 3.7.0 which we build with (almost) all external dependencies as static libraries. However, we've noticed that when we try to compile our app against the resulting library the ESRI Shapefile API isn't available.<br><br>Severity    Code    Description<br>Error      LNK2001 unresolved external symbol DBFClose<br>Error      LNK2001 unresolved external symbol SHPOpen<br><snip><br>Error LNK2001 unresolved external symbol SHPCreateObject<br>Error       LNK2001 unresolved external symbol SHPClose<br><br>Looking at the .libs' symbols:<br><br>DUMPBIN /linkermember D:\gdal-3.5.1\build\gdal_i.lib | sls DBF<br><br>   1ED958 DBFOpen<br>   1ED958 __imp_DBFOpen<br>   1ED9BC DBFOpenLL<br>   1ED9BC __imp_DBFOpenLL<br>   1ED3D0 DBFCreate<br>   1ED3D0 __imp_DBFCreate<br>   1ED436 DBFCreateEx<br>   1ED436 __imp_DBFCreateEx<br><snip 50+ lines><br>     1257 __imp_DBFWriteNULLAttribute<br>     1256 __imp_DBFWriteStringAttribute<br>     125B __imp_DBFWriteTuple<br><br>DUMPBIN /linkermember D:\gdal-3.7.0\build\gdal.lib | sls DBF<br><br>      DBF OSRGetAxesCount<br>      DBF __imp_OSRGetAxesCount<br><br>We build the DLL and apps with the following command in a .bat script (all library paths are valid and it compiles):<br><br>cmake -G "Visual Studio 16 2019" -DBUILD_APPS=ON -DBUILD_SHARED_LIBS=ON ^<br>      -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=D:\gdal-3.7.0-build ^<br>   -DCMAKE_CXX_FLAGS="-DCURL_STATICLIB -DXML_STATIC" -DGDAL_USE_EXTERNAL_LIBS=OFF ^<br>    -DOGR_BUILD_OPTIONAL_DRIVERS=ON ^<br>     -DPROJ_INCLUDE_DIR="%~dp0proj-6.3.1\src" ^<br>  -DPROJ_LIBRARY_RELEASE="%~dp0proj-6.3.1\build_VS2017_x64\lib\RelWithDebInfo\proj.lib" ^<br>     -DGDAL_USE_CURL=ON -DCURL_INCLUDE_DIR="%~dp0libcurl\include" -DCURL_LIBRARY_RELEASE="%~dp0libcurl\lib\libcurl.lib" ^<br>      -DGDAL_USE_ECW=ON -DECW_INCLUDE_DIR="%~dp0ERDAS ECW JPEG 2000 SDK 5.5.0\Desktop Read-Only\include" -DECW_LIBRARY="%~dp0ERDAS ECW JPEG 2000 SDK 5.5.0\Desktop Read-Only\lib\vc141\x64\NCSEcw.lib" ^<br>        -DGDAL_USE_ODBC=ON ^<br>  -DGDAL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR="%~dp0openssl-1.1.0f-vs2017" -DOPENSSL_USE_STATIC_LIBS=TRUE -DOPENSSL_MSVC_STATIC_RT=TRUE ^<br>        -DGDAL_ENABLE_DRIVER_PDF_PLUGIN=ON ^<br>  -DGDAL_USE_PDFIUM=ON -DPDFIUM_INCLUDE_DIR="%~dp0ExtractPDFium\install\include\pdfium"  -DPDFIUM_LIBRARY="%~dp0ExtractPDFium\install\lib\pdfium.lib" ^<br>    -DGDAL_USE_SQLITE3=ON -DSQLite3_INCLUDE_DIR="%~dp0sqlite-amalgamation-3370200"  -DSQLite3_LIBRARY="%~dp0sqlite-amalgamation-3370200\sqlite3.lib" ^<br>       -DGDAL_USE_XERCESC=ON -DXercesC_INCLUDE_DIR="%~dp0xerces-c-3.2.4\src" -DXercesC_LIBRARY="%~dp0xerces-c-3.2.4\build\src\Release\xerces-c_3.lib" ^<br>  -DGDAL_USE_EXPAT=ON -DEXPAT_INCLUDE_DIR="%~dp0Expat\lib" -DEXPAT_LIBRARY="%~dp0Expat\RelWithDebInfo\libexpat.lib" ^<br>       ..<br><br>The build documentation at <a href="https://gdal.org/development/building_from_source.html" target="_blank">https://gdal.org/development/building_from_source.html</a> says the ESRI Shapefile API cannot be disabled, so I'm wondering what's going on.  Is this a bug, or did we just misconfigure something? This is our first time semi-successfully building with the new CMake system.<div><br>Derek Newhall</div></div>
</blockquote></div>
<br><br><p style="font-family: Verdana; font-size:10pt; color:#777777;"><b>Disclaimer</b></p><p style="font-family: Verdana; font-size:8pt; color:#777777;">The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.</p></body></html>