这是indexloc提供的服务,不要输入任何密码
Skip to content

Protobuf linking error while building the project as a git submodule #367

@mrsaibaandreas

Description

@mrsaibaandreas

OS: Ubuntu 24.04
Compiler: g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
CMake: 3.28.3

I'm trying to build the GameNetworkingSockets library and I get this error. No clue what is generating it. I already have protobuf installed, via the BUILDING.md specifications.

CMake Error at GameNetworkingSockets/src/CMakeLists.txt:168 (target_link_libraries):
  Target "GameNetworkingSockets" links to:

    protobuf::libprotobuf

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  GameNetworkingSockets/src/CMakeLists.txt:232 (gns_set_target_protobuf_properties)
  GameNetworkingSockets/src/CMakeLists.txt:328 (set_clientlib_target_properties)


CMake Error at GameNetworkingSockets/src/CMakeLists.txt:168 (target_link_libraries):
  Target "GameNetworkingSockets_s" links to:

    protobuf::libprotobuf

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  GameNetworkingSockets/src/CMakeLists.txt:232 (gns_set_targ
```et_protobuf_properties)
  GameNetworkingSockets/src/CMakeLists.txt:336 (set_clientlib_target_properties)

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