본문 바로가기

반응형

Linux Server

(21)
mbstring 확장 모듈 설정 mbstring확장 모듈생성 방법 1. 같은 버젼의 php 소스 다운로드 2. 압축 풀고 cd PHP소스디렉토리/ext/mbstring 3. find / -name phpize 4. find / -name php-config 5. /phpize 디렉토리/phpize 6. ./configure --with-php-config=/php-config디렉토리/php-config --enable-mbstring 7. make // mbstring/modules/에 mbstring.so 생성됨 8. mbstring.so 이 화일을 php.ini 화일의 extension_dir=확장모듈 경로
mysql 캐릭터셋 utf8로 설정 /etc/my.cnf [client] default-character-set=utf8 [mysqld] character-set-server=utf8 collation-server=utf8_general_ci init_connect=set collation_connection=utf8_general_ci init_connect=set names utf8 character-set-client-handshake=TRUE skip-character-set-client-handshake 확인 방법
크로스 컴파일시 cannot find -lbluetooth 오류 크로스 컴파일시 오류 arm-linux-gcc -o test test.c -lbluetooth /usr/local/arm-linux/lib/gcc-lib/arm-linux/3.2.1/../../../../arm-linux/bin/ld: cannot find -lbluetooth collect2: ld returned 1 exit status 라이브러리를 못찾는 문제입니다. 다음과 같이 라이브러리를 지정하면 컴파일이 가능합니다. arm-linux-gcc -o test test.c -L/usr/local/arm-linux/lib -lbluetooth
BlueZ 를 사용할때 컴파일 방법 BlueZ 라이브러리를 이용하여 프로그래밍을 할때 컴파일을 하였는데 /tmp/ccO6DVsB.o(.text+0x102): In function `main': : undefined reference to `ba2str' collect2: ld returned 1 exit status 이와 같은 오류가 뜬다면 옵션을 주지 않아서 입니다. gcc -o test test.c -lbluetooth -lbluetooth 를 붙여주면 오류없이 컴파일 됩니다. gcc 뿐만 아니라 g++ 도 같은 옵션이 존재하는 것 같습니다.
컴파일시 pthread 오류 리눅스 콘솔에서 컴파일할때 pthread를 사용하였을때 이런 오류가 뜬다. undefined reference to `pthread_create' undefined reference to `pthread_join' 해결 방법은 옵션 2가지를 넣어주면 됩니다. -D_REENTRANT -lpthread ex) gcc test.c -o test -D_REENTRANT -lpthread

반응형