[geos-commits] r3364 - in trunk: capi tests/unit/capi

svn_geos at osgeo.org svn_geos at osgeo.org
Fri May 13 12:22:29 EDT 2011


Author: mloskot
Date: 2011-05-13 09:22:29 -0700 (Fri, 13 May 2011)
New Revision: 3364

Modified:
   trunk/capi/CMakeLists.txt
   trunk/tests/unit/capi/GEOSIntersectsTest.cpp
Log:
GEOS DLL exports are pretty much messed up. The same DLL declspec is used by both C++ and C DLLs. So, GEOS C DLL cannot import and link properly against GEOS C++ interface as the declspec(dllexport) is specified for the GEOS C++ DLL where declspec(dllimport) is expected. This commit fixes the issue (temporarily) by linking GEOS C DLL against GEOS C++ static library.

Modified: trunk/capi/CMakeLists.txt
===================================================================
--- trunk/capi/CMakeLists.txt	2011-05-13 16:17:38 UTC (rev 3363)
+++ trunk/capi/CMakeLists.txt	2011-05-13 16:22:29 UTC (rev 3364)
@@ -24,7 +24,7 @@
 
 add_library(geos_c SHARED ${geos_c_SOURCES} ${geos_capi_HEADERS})
 
-target_link_libraries(geos_c geos)
+target_link_libraries(geos_c geos-static)
 
 # TODO: Enable SOVERSION property
 set_target_properties(geos_c

Modified: trunk/tests/unit/capi/GEOSIntersectsTest.cpp
===================================================================
--- trunk/tests/unit/capi/GEOSIntersectsTest.cpp	2011-05-13 16:17:38 UTC (rev 3363)
+++ trunk/tests/unit/capi/GEOSIntersectsTest.cpp	2011-05-13 16:22:29 UTC (rev 3364)
@@ -125,7 +125,7 @@
     {
         GEOSCoordSequence* cs = GEOSCoordSeq_create(5, 2);
 
-        double nan = -0.0/0;
+        double nan = std::numeric_limits<double>::quiet_NaN();        
         GEOSCoordSeq_setX(cs, 0, 1); GEOSCoordSeq_setY(cs, 0, 1);
         for (unsigned int i=1; i<4; ++i) {
             GEOSCoordSeq_setX(cs, i, nan);



More information about the geos-commits mailing list