Skip to content

Linker error when disabling the GRAPHQL_USE_RAPIDJSON option #367

Description

I tried to build the library on Linux using CMake. First, I ran the configuration step:

cmake . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DGRAPHQL_USE_RAPIDJSON=OFF -DGRAPHQL_BUILD_TESTS=OFF

Then I started the build:

cmake --build build/ -- -j$(nproc)

Compilation succeeded, but linking failed with the following error:

/usr/local/bin/ld: cannot find -lgraphqljson: No such file or directory

This error appeared multiple times for the following targets:

[ 79%] Linking CXX executable sample
[ 82%] Linking CXX executable benchmark
[ 82%] Linking CXX executable sample_nointrospection
[ 82%] Linking CXX executable learn_star_wars
[ 83%] Linking CXX executable benchmark_nointrospection
[ 89%] Linking CXX executable server
[ 95%] Linking CXX executable client

If the configuration settings allow disabling the use of RapidJSON, why isn't this accounted for in the build scripts? Why do they require this library?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions