Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could NOT find Protobuf (missing: Protobuf_LIBRARIES) (found version "5.30.0") #19107

Open
mohsenkondori opened this issue Nov 1, 2024 · 0 comments

Comments

@mohsenkondori
Copy link

mohsenkondori commented Nov 1, 2024

What version of protobuf and what language are you using?
Version: main/v5.30.0 (commit: 51e2664f2f9f)
Language: C++

What operating system (Linux, Windows, ...) and version?
Embded unix

What runtime / compiler are you using (e.g., python version or gcc version)
gcc 9.4.0

What did you do?
Steps to reproduce the behavior:
I built the 51e2664f2f9 commit with an embded unix system as a static library (in Release), but I can not link it with my project and I get the bellow error

cmake codes:

  set(PROTOBUF_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/protobufLibs/include")
  set(PROTOBUF_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/protobufLibs/lib")

  set(protobuf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/protobufLibs/lib/cmake/protobuf")

  find_package(Protobuf REQUIRED)
  include_directories(${Protobuf_INCLUDE_DIRS})
  include_directories(${CMAKE_CURRENT_BINARY_DIR})

errors:

[cmake] CMake Error at /snap/cmake/1417/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):

[cmake]   Could NOT find Protobuf (missing: Protobuf_LIBRARIES) (found version

[cmake]   "5.30.0")

[cmake] Call Stack (most recent call first):

[cmake]   /snap/cmake/1417/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)

[cmake]   /snap/cmake/1417/share/cmake-3.30/Modules/FindProtobuf.cmake:752 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)

[cmake]   CMakeLists.txt:58 (find_package)

What did you expect to see

What did you see instead?

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

@mohsenkondori mohsenkondori added the untriaged auto added to all issues by default when created. label Nov 1, 2024
@esrauchg esrauchg removed the untriaged auto added to all issues by default when created. label Nov 6, 2024
@ericsalo ericsalo removed their assignment Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants