error during making GTest

后端 未结 5 2266
执笔经年
执笔经年 2020-12-15 02:52

I was trying to set up GTest environment on my Ubuntu machine. but while making the GTest to get the library, i get the following error...

som@som-VPCEH25EN:         


        
5条回答
  •  忘掉有多难
    2020-12-15 03:52

    Have you seen Erik Smistad's excellent tutorial on how to get started w/ gtest on Ubuntu? I've just tried it on (K)ubuntu 12.04 and it worked perfectly. In short, what you need to do is

    sudo apt-get install cmake libgtest-dev
    cd /usr/src/gtest
    sudo cmake CMakeLists.txt
    sudo make
    sudo cp *.a /usr/lib
    

    If you feel uncomfortable running make and cmake as root, you'd have to copy /usr/src/gtest to a directory writable by your user. In the tutorial, Erik also provides a sample test with a CMakeLists.txt to build it.

提交回复
热议问题