'2021/01/19'에 해당되는 글 2건

  1. 2021.01.19 cmake 빌드 에러시
  2. 2021.01.19 g++ 은 정적 빌드가 안되나?

어우.. cmake 너무 시르다..

빌드 하는데 안되면 CMakeCache.txt 파일 삭제하고 재시도 하면 된다.

 

[링크 : https://stackoverflow.com/questions/45518317/in-source-builds-are-not-allowed-in-cmake]

'프로그램 사용 > make, configure' 카테고리의 다른 글

cmake ninja, cmake 옵션주기  (0) 2022.12.07
cmake 옵션 확인  (0) 2021.01.20
make order  (0) 2016.06.16
make /bin/sh: 1: pushd: not found 에러  (0) 2016.06.08
make 기본셸  (0) 2016.06.08
Posted by 구차니
프로그램 사용/gcc2021. 1. 19. 11:00

 

tensorflow lite 빌드해서 static libaray 로 libtensorflow-lite.a는 얻어냈는데

얘를 링크해서 빌드하니 dynamic link가 된다.

 

궁금해서 hello.cpp 이런거 하나 구해서 g++로 빌드하니

무조건 끌어가는 것 같긴한데

$ cat hello.cpp
// hello.cpp file
#include <iostream>
int main()
{
    std::cout << "Hello Geek\n";
    return 0;
}

$ g++ hello.cpp
$ ldd a.out
        linux-vdso.so.1 (0x7efa4000)
        /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0x76f7e000)
        libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76e19000)
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76d97000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76d6a000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76c1c000)
        /lib/ld-linux-armhf.so.3 (0x76f93000)

 

혹시나 해서 g++ -static 옵션을 주니 되긴 되네..

$ g++ hello.cpp -o b.out -static
$ ldd b.out
        not a dynamic executable

'프로그램 사용 > gcc' 카테고리의 다른 글

Auto-vectorization in GCC  (0) 2021.03.25
gcc -march 옵션  (0) 2021.01.24
gcc offloading support  (0) 2020.11.24
gcc 특정 영역만 최적화 하지 않게 하기  (0) 2020.10.21
gcc의 linker 옵션 은 가장 끝에  (0) 2019.06.21
Posted by 구차니