bls-signatures icon indicating copy to clipboard operation
bls-signatures copied to clipboard

undefined reference to `bls::... const'

Open Jimmy01240397 opened this issue 3 years ago • 2 comments

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? image image

Jimmy01240397 avatar Sep 27 '21 10:09 Jimmy01240397

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 avatar Sep 27 '21 21:09 AmineKhaldi

@AmineKhaldi thank later I will try it. ❤️

Jimmy01240397 avatar Sep 30 '21 10:09 Jimmy01240397

Closing old issue

emlowe avatar Feb 02 '23 20:02 emlowe