Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#576 closed enhancement (wontfix)

CMake Compile: Build fails with Unresolved Externals

Reported by: RMWChaos Owned by: mloskot
Priority: minor Milestone: 3.3.6
Component: Build/Install (cmake) Version: 3.3.5
Severity: Feature Request Keywords: CMake Compile Error
Cc:

Description

This failure is very similar to the problem resolved in Trac Ticket #574, which involved a straight NMake build (no CMake component). So likely, this has to do with the recent inclusion of geos\src\util\interrupt.cpp.

Following instructions on http://trac.osgeo.org/geos/wiki/BuildingOnWindowsWithCMake; Building with SDK 7.0 x64 (MSVC 2008).

  1. Downloaded svn_trunk
  1. Copied geos\src\util\triangulate directory from nightly snapshot (missing in svn_trunk)
  1. Ran C:\temp\geos\build> cmake -G "NMake Makefiles" C:\temp\geos
  1. Ran C:\temp\geos\build> nmake /f makefile MSVC_VER=1500

Build fails at 83% linking ..\bin\geos_c.dll...

Linking CXX shared library ..\bin\geos_c.dll
   Creating library ..\lib\geos_c.lib and object ..\lib\geos_c.exp
geos_c.cpp.obj : error LNK2001: unresolved external symbol "private: static
bool geos::util::Interrupt::requested" (?requested@Interrupt@util@geos@@0_NA
)
geos_ts_c.cpp.obj : error LNK2001: unresolved external symbol "private: stat
ic bool geos::util::Interrupt::requested" (?requested@Interrupt@util@geos@@0
_NA)
geos_c.cpp.obj : error LNK2001: unresolved external symbol "private: static
void (__cdecl* geos::util::Interrupt::callback)(void)" (?callback@Interrupt@
util@geos@@0P6AXXZEA)
geos_ts_c.cpp.obj : error LNK2001: unresolved external symbol "private: stat
ic void (__cdecl* geos::util::Interrupt::callback)(void)" (?callback@Interru
pt@util@geos@@0P6AXXZEA)
..\bin\geos_c.dll : fatal error LNK1120: 2 unresolved externals
LINK Pass 1 failed. with 1120
NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe"
' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\Bin\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\Bin\amd64\nmake.exe"' : return code '0x2'
Stop.

Change History (5)

comment:1 Changed 5 years ago by RMWChaos

Correction: geos/src/triangulate missing (not geos/src/util/triangulate)

comment:2 Changed 5 years ago by strk

Milestone: 3.3.53.3.6
Version: svn-trunk3.3.5

comment:3 Changed 5 years ago by strk

Priority: blockerminor
Resolution: wontfix
Severity: CriticalFeature Request
Status: newclosed
Type: defectenhancement

The official build system is the automake one. Please only file tickets against cmake if willing to provide a patch (sorry).

comment:4 Changed 5 years ago by mloskot

@strk

Feel free to discard CMake tickets, perhaps you can clarify the policy on wiki or just remove the wiki and CMake stuff from SVN to avoid confusions.

comment:5 Changed 5 years ago by mloskot

Patch submitted to #611 should fix the problem, needs testing.

Note: See TracTickets for help on using tickets.