Category : static-libraries

🐛 Bug I downloaded the source of pytorch 1.9.0. And i built it with SHARED_LIBS off as follows to get a compact build cmake -GNinja -DBUILD_TEST:BOOL=OFF -DUSE_CUDA:BOOL=ON -DUSE_CUDNN:BOOL=ON -DUSE_MAGMA:BOOL=OFF -DUSE_PTHREADPOOL:BOOL=OFF -DUSE_SOURCE_DEBUG_ON_MOBILE:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=Release -DPYTHON_EXECUTABLE:PATH=`which python3` -DUSE_KINETO:BOOL=OFF -DUSE_DISTRIBUTED:BOOL=OFF -DUSE_OPENMP:BOOL=OFF -DUSE_MKLDNN:BOOL=OFF -DUSE_NCCL:BOOL=OFF -DBUILD_PYTHON:BOOL=OFF -DUSE_QNNPACK:BOOL=OFF -DUSE_PYTORCH_QNNPACK:BOOL=OFF -DUSE_XNNPACK:BOOL=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=../libtorch_v6 ../pytorch I am able to see the following generated .a ..

Read more

Here is a very simple script using gtest (saved in file gt.cpp) #include<gtest/gtest.h> double timesTwo(double x){return x*2;} TEST(testTimesTwo, integerTests){EXPECT_EQ(6, timesTwo(3));} int main(int argc, char* argv[]){ testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } The script compiles fine with CLANG (Apple clang version 11.0.3) clang++ -std=c++17 -lgtest gt.cpp -o gt but fails with GCC (g++ (GCC) 10.2.0) g++ -std=c++17 ..

Read more

I am trying to build a program using conan and CMake, but I’m having some issues when linking. CMake doesn’t find the libraries provided by conan. versions OS: 5.10.68-1-MANJARO x86_64 Conan version: 1.40.1 CMake version: 3.21.3 gcc version: 11.1.0 conan profile target_host=x86_64-pc-linux-gnu cc_compiler=gcc cxx_compiler=g++ [settings] os=Linux os_build=Linux arch=x86_64 arch_build=x86_64 compiler=gcc compiler.version=11 build_type=Release compiler.libcxx=libstdc++11 [options] [build_requires] ..

Read more