Library links missing

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Library links missing

brainslush
When I tried to create a straight skeleton from an example I got a linking
error.

==============================================

//usr/bin/ld: CMakeFiles/skeleton.dir/main.cpp.o: in function
`CORE::RCRepImpl<CORE::BigFloatRep>::decRef()':
main.cpp:(.text._ZN4CORE9RCRepImplINS_11BigFloatRepEE6decRefEv[_ZN4CORE9RCRepImplINS_11BigFloatRepEE6decRefEv]+0x52):
undefined reference to `CORE::BigIntRep::operator delete(void*, unsigned
long)'/

==============================================

and many more to CORE::BigIntRep. I probably need to link to another library
but why isn't it included in the /find_package(CGAL QUIET COMPONENTS)/ ?

*My CMAKE file:*

==============================================
/
cmake_minimum_required(VERSION 3.12)
project(skeleton)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_BUILD_TYPE Release)

find_package(CGAL QUIET COMPONENTS)

if (NOT CGAL_FOUND)
    message(STATUS "This project requires the CGAL library, and will not be
compiled.")
    return()
endif ()

# include helper file
include(${CGAL_USE_FILE})

# Boost and its components
find_package(Boost COMPONENTS thread REQUIRED)

if (NOT Boost_FOUND)
    message(STATUS "This project requires the Boost library, and will not be
compiled.")
    return()
endif ()

add_to_cached_list(
        CGAL_EXECUTABLE_TARGETS
)

add_executable(
        skeleton
        main.cpp
)

target_link_libraries(
        skeleton
        ${Boost_LIBRARIES}
        ${CGAL_LIBRARIES}
        ${CGAL_3RD_PARTY_LIBRARIES}
)/



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Library links missing

Sebastien Loriot (GeometryFactory)
Core is required. Update your cmake list to have:

find_package(CGAL QUIET COMPONENTS Core )

Sebastien.

On 08/22/2018 02:08 PM, brainslush wrote:

> When I tried to create a straight skeleton from an example I got a linking
> error.
>
> ==============================================
>
> //usr/bin/ld: CMakeFiles/skeleton.dir/main.cpp.o: in function
> `CORE::RCRepImpl<CORE::BigFloatRep>::decRef()':
> main.cpp:(.text._ZN4CORE9RCRepImplINS_11BigFloatRepEE6decRefEv[_ZN4CORE9RCRepImplINS_11BigFloatRepEE6decRefEv]+0x52):
> undefined reference to `CORE::BigIntRep::operator delete(void*, unsigned
> long)'/
>
> ==============================================
>
> and many more to CORE::BigIntRep. I probably need to link to another library
> but why isn't it included in the /find_package(CGAL QUIET COMPONENTS)/ ?
>
> *My CMAKE file:*
>
> ==============================================
> /
> cmake_minimum_required(VERSION 3.12)
> project(skeleton)
>
> set(CMAKE_CXX_STANDARD 17)
>
> set(CMAKE_BUILD_TYPE Release)
>
> find_package(CGAL QUIET COMPONENTS)
>
> if (NOT CGAL_FOUND)
>      message(STATUS "This project requires the CGAL library, and will not be
> compiled.")
>      return()
> endif ()
>
> # include helper file
> include(${CGAL_USE_FILE})
>
> # Boost and its components
> find_package(Boost COMPONENTS thread REQUIRED)
>
> if (NOT Boost_FOUND)
>      message(STATUS "This project requires the Boost library, and will not be
> compiled.")
>      return()
> endif ()
>
> add_to_cached_list(
>          CGAL_EXECUTABLE_TARGETS
> )
>
> add_executable(
>          skeleton
>          main.cpp
> )
>
> target_link_libraries(
>          skeleton
>          ${Boost_LIBRARIES}
>          ${CGAL_LIBRARIES}
>          ${CGAL_3RD_PARTY_LIBRARIES}
> )/
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Library links missing

brainslush
Yeah thanks found that on my own.
I tried CORE and core before.
First from the namespace name and the latter from boost convention. That's
why I got confused.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss