Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
While following this article https://medium.com/@ivan.mejia/modern-c-micro-service-implementation-rest-api-b499ffeaf898[^]

I tried to clone and build the rest sdk for linux from GitHub - ivanmejiarocha/micro-service: sample micro-service in C++[^]

while trying to build using ./build_dependencies.sh inside micro-service/lib

I am getting the following error

Cloning into './cpprestsdk'...
remote: Enumerating objects: 29894, done.
remote: Total 29894 (delta 0), reused 0 (delta 0), pack-reused 29894
Receiving objects: 100% (29894/29894), 10.67 MiB | 1024.00 KiB/s, done.
Resolving deltas: 100% (21961/21961), done.
Submodule 'websocketpp' (https://github.com/zaphoyd/websocketpp) registered for path 'Release/libs/websocketpp'
Submodule 'vcpkg' (https://github.com/Microsoft/vcpkg) registered for path 'vcpkg'
Cloning into '/home/devpar/Documents/micro-service/libs/cpprestsdk/Release/libs/websocketpp'...
Cloning into '/home/devpar/Documents/micro-service/libs/cpprestsdk/vcpkg'...
Submodule path 'Release/libs/websocketpp': checked out '56123c87598f8b1dd471be83ca841ceae07f95ba'
Submodule path 'vcpkg': checked out 'b759049a36728d18260963799a56e6b19cb4a2ef'
error: The following untracked working tree files would be overwritten by checkout:
        Release/libs/websocketpp/.gitattributes
        Release/libs/websocketpp/.gitignore
        Release/libs/websocketpp/.travis.yml
...
Aborting
-- The C compiler identification is GNU 10.2.1
CMake Error at /usr/share/cmake-3.18/Modules/CMakeDetermineCXXCompiler.cmake:48 (message):
  Could not find compiler set in environment variable CXX:

  g++-4.9.

Call Stack (most recent call first):
  CMakeLists.txt:7 (project)


CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/home/devpar/Documents/micro-service/libs/cpprestsdk/build.release/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found.  Stop.


What I have tried:

How to fix it?
Posted
Updated 21-Feb-21 20:53pm
Comments
Shao Voon Wong 21-Feb-21 22:22pm    
You should ask in the Github link you provided. Only the author knows best how to build.

1 solution

It says,
Could not find compiler set in environment variable CXX: g++-4.9.
That means the EV is set to g++-4.9 but that compiler can not be found. You need to either make that compiler accessible to Cmake or set the environment variable CXX to the compiler you have available.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900