visual studio 에서 htonl, htons 등 함수를 사용하려 할 때 컴파일 에러 등이 발생했을 때 해결 방법은 다음과 같다.
Ws2_32.lib 라이브러리 파일을 visual studio 링커에 링크 시키고 소스코드 include 부분에 다음과 같이 적어준다.
#include <Winsock2.h>
Ws2_32.lib 파일은 보통 “Platform SDK(PSDK-x86.exe)” 이 설치 되어 있으면 “C:\Program Files\Microsoft Platform SDK\Lib” 에 위치한다. PSDK 가 없으면 다운 받으면 된다. 제 경우에는 이전에 해당 라이브러리 파일이 설치가 되어 있었다. 검색을 해보니 "C:\Program Files\Windows Kits\8.1\Lib\winv6.3\um" , " C:\Program Files\Microsoft SDKs\Windows\v7.1A\Lib" 에도 존재했다.
htonl(), htons(), inet_aton() 같은 함수를 사용을 위해 에러를 발생시키지 않기 위해 Visual studio 에서 Ws2_32.lib 라이브러리 파일을 링크하는 순서는 다음과 같다.
1. 솔루션탐색기에서 프로젝트를 선택하고 속성을 선택해 속성창을 띄운다.
2. 속성 중에 링커 폴더를 클릭하고
3. 입력 항목을 선택한다.
4. 추가 종속성 항목에 Ws2_32.lib 을 추가한다.
그럼 조그마한 도움이 되었길 바라며
'Embeded' 카테고리의 다른 글
/usr/bin/ld: cannot find -lperl (0) | 2015.05.26 |
---|---|
ubuntu 10.04 tftp 설정 (tftpd-hpa) (0) | 2013.11.28 |
SNMP 구현을 위해서 소스를 다운받아서 make 하는데
계속 빌드 에러로 진행이 안되었다.
/usr/bin/ld: cannot find -lperl
collect2: error: ld returned 1 exit status
apt-get 으로 해당 라이브러리를 다운받아 설치하면 된다.
참고사이트
http://stackoverflow.com/questions/17576911/cannot-find-lperl-doing-a-makefile-on-c
'Embeded' 카테고리의 다른 글
visual studio 에서 htonl, htons 등 관련 에러 해결 방법 (0) | 2016.07.01 |
---|---|
ubuntu 10.04 tftp 설정 (tftpd-hpa) (0) | 2013.11.28 |
우선 tftp 설정하는 법은 많이들 나와 있다. 요약하면 이렇고
1. Install tftpd and related packages.
$ sudo apt-get install xinetd tftpd tftp
2. Create /etc/xinetd.d/tftp and put this entry:
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
3. Make /tftpboot directory
$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo chown -R nobody /tftpboot
4. Restart xinetd
$ sudo /etc/inet.d/xinetd restart
* 여기서 중요한건 10.04 에서만 해당하는 줄은 모르겠지만 보안상
tftp-hpa라는 것을 설치하는 것 같네요[출처] ubuntu 10.04에 tftp-hpa설치|작성자 난리법석
'Embeded' 카테고리의 다른 글
visual studio 에서 htonl, htons 등 관련 에러 해결 방법 (0) | 2016.07.01 |
---|---|
/usr/bin/ld: cannot find -lperl (0) | 2015.05.26 |