Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#801 closed defect (fixed)

Fixed compile error C2668/C2065/C3861 & link error LNK2019 (Microsoft VS2010)

Reported by: sunxunfeng Owned by: strk
Priority: major Milestone: 3.6.2
Component: Unit Tests Version: main
Severity: Unassigned Keywords:
Cc: kyngchaos

Description

3>..\..\..\tests\unit\capi\GEOSSTRtreeTest.cpp(33): error C2668: “sqrt”: 对重载函数的调用不明确
3>          D:\GreenSoft\VS2010\VC\include\math.h(589): 可能是“long double sqrt(long double)”
3>          D:\GreenSoft\VS2010\VC\include\math.h(541): 或       “float sqrt(float)”
3>          D:\GreenSoft\VS2010\VC\include\math.h(127): 或       “double sqrt(double)”
3>          尝试匹配参数列表“(int)”时
3>..\..\..\tests\unit\capi\GEOSDistanceTest.cpp(93): error C2065: “M_PI”: 未声明的标识符
3>..\..\..\tests\unit\capi\GEOSDistanceTest.cpp(124): warning C4800: “int”: 将值强制为布尔值“true”或“false”(性能警告)
3>..\..\..\tests\unit\capi\GEOSDistanceTest.cpp(125): warning C4800: “int”: 将值强制为布尔值“true”或“false”(性能警告)

3>..\..\..\tests\xmltester\XMLTester.cpp(338): error C3861: “round”: 找不到标识符

1>XMLTester.obj : error LNK2019: 无法解析的外部符号 "double __cdecl geos::util::java_math_round(double)" (?java_math_round@util@geos@@YANN@Z),该符号在函数 "double __cdecl 

geos::util::round(double)" (?round@util@geos@@YANN@Z) 中被引用
1>C:\t\geostrunk\vc2010\bin\Debug\xmltester.exe : fatal error LNK1120: 1 个无法解析的外部命令
1>
1>生成失败。
1>
1>已用时间 00:00:00.56

Attachments (4)

GEOSSTRtreeTest.cpp.patch (338 bytes ) - added by sunxunfeng 7 years ago.
GEOSDistanceTest.cpp.patch (327 bytes ) - added by sunxunfeng 7 years ago.
XMLTester.cpp.patch (855 bytes ) - added by sunxunfeng 7 years ago.
CMakeLists.txt.patch (358 bytes ) - added by sunxunfeng 7 years ago.

Download all attachments as: .zip

Change History (11)

by sunxunfeng, 7 years ago

Attachment: GEOSSTRtreeTest.cpp.patch added

by sunxunfeng, 7 years ago

Attachment: GEOSDistanceTest.cpp.patch added

by sunxunfeng, 7 years ago

Attachment: XMLTester.cpp.patch added

by sunxunfeng, 7 years ago

Attachment: CMakeLists.txt.patch added

comment:1 by sunxunfeng, 7 years ago

Milestone: 3.6.1
Summary: Fixed compile error C2668/C2065/C3861 & link error LNK2019 (Miscrosoft VS2010)Fixed compile error C2668/C2065/C3861 & link error LNK2019 (Microsoft VS2010)

comment:2 by strk, 7 years ago

Milestone: 3.6.13.6.2

Ticket retargeted after milestone closed

comment:3 by mloskot, 7 years ago

Owner: changed from mloskot to strk

Fixed:

Delegated:

  • XMLTester.cpp.patch​ - maintained by strk
  • CMakeLists.txt.patch​ - CMake is not an official build; change related to XMLTester

comment:4 by Sandro Santilli <strk@…>, 7 years ago

In c505c8a/git:

Fixed compile error in Microsoft VS2010

Patch by sunxunfeng
See #801

comment:5 by Sandro Santilli <strk@…>, 7 years ago

Resolution: fixed
Status: newclosed

In 731a451/git:

Fixed compile error in Microsoft VS2010

Patch by sunxunfeng
Closes #801 in 3.6 branch

comment:6 by strk, 7 years ago

Cc: kyngchaos added

Only patch not applied is the CMake related one. CMake build scripts are missing a maintainer

comment:7 by strk, 7 years ago

btw, I see src/CMakeLists.txt containing a snippet: file(GLOB_RECURSE geos_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) which looks like supposedly already including math.cpp...

Note: See TracTickets for help on using tickets.