로딩
요청 처리 중입니다...

라이브러리 링크

 라이브러리 링크

시스템에 shared lib 등록 1. 라이브러리 생성 및 /usr/lib에 생성한 so 파일 copy #include // libmytest.c // gcc -shared libmytest.c -o libmytest.so // /usr/lib/x86_64-linux-gnu/ 에 libmytest.so copy int kswadd(int a,int b){ return a+b; } 2.

/usr/include에 헤더 파일 등록 // /usr/include/mytest.h extern int kswadd(int a,int b); 3. gcc로 빌드 시 아래와 같이 입력 gcc -o test test.c -lmytest gcc 빌드 시 라이브러리 링크 gcc -o test test.c -Wl,-rpath= -l mytest //configure 파일 설정 시 -Wl,-rpath 지정 ./configure LDFLAGS="-Wl,-rpa...

# gcc # 링크

원문 링크 : 라이브러리 링크