bls-signatures
bls-signatures copied to clipboard
undefined reference to `bls::... const'
I am trying to compile with g++ and I get this error. Other CPP files and g++ compiles just fine. And cmake is already fine.
the main.cpp content is copy from project readme.md
Can someone help me with what I am doing wrong here?
Hi @Jimmy01240397
Here's an example CMakeLists.txt
you can put next to your main.cpp
to have a working solution across all platforms:
cmake_minimum_required(VERSION 3.16)
project(blstest)
include(FetchContent)
FetchContent_Declare(bls_signatures
GIT_REPOSITORY https://github.com/Chia-Network/bls-signatures.git
GIT_TAG "b3acfe5ecd23660f8ce21a2aafb9d14c3263fef7"
)
set(BUILD_BLS_PYTHON_BINDINGS "0" CACHE STRING "")
set(BUILD_BLS_TESTS "0" CACHE STRING "")
set(BUILD_BLS_BENCHMARKS "0" CACHE STRING "")
FetchContent_MakeAvailable(bls_signatures)
add_executable(blstest main.cpp)
target_link_libraries(blstest PRIVATE bls)
I hope that helps!
@AmineKhaldi thank later I will try it. ❤️
Closing old issue