Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies #463

Closed
OgreTransporter opened this issue Jun 30, 2021 · 3 comments
Closed

Dependencies #463

OgreTransporter opened this issue Jun 30, 2021 · 3 comments

Comments

@OgreTransporter
Copy link

Currently, ryu is built as a dependency in the form of a static library. This is not really a problem, unless you also build GEOS statically, too. Then the library ryu is missing on linking against GEOS. Currently I have solved the problem by appending the following to CMakeLists.txt:

if(NOT BUILD_SHARED_LIBS)
  install(TARGETS ryu LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
endif()

Now the ryu library is installed as well and I can link the target project with GEOS and ryu. But maybe it would make more sense to include the ryu code directly in GEOS.

@dbaston
Copy link
Member

dbaston commented Jun 30, 2021

Does it work as expected if ryu is built as an OBJECT library? (reverting c6abbf9)

The motivation for not including the code directly is #394 . Perhaps it creates more problems than it solves.

@OgreTransporter
Copy link
Author

I need GEOS to compile spatlite. Currently I get the error message

1>geos_staticd.lib(WKTWriter.obj) : error LNK2019: Reference to unresolved external symbol "geos_d2sfixed_buffered_n" in function ""protected: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl geos::io::WKTWriter::writeNumber(double)const " (? writeNumber@WKTWriter@io@geos@@IEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@N@Z)".
1>D:\SpatiaLite\build\src\Debug\spatialited.dll : fatal error LNK1120: 1 unresolved externals

I have built GEOS as a static library which does not include ryu. Using OBJECT instead of STATIC works for me.

As already written, I have no problem with STATIC if ryu is then installed by CMake and the exported GEOS target then also links against ryu.

@dbaston
Copy link
Member

dbaston commented Oct 20, 2021

Resolved by f65bb35

@dbaston dbaston closed this as completed Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants