기본 콘텐츠로 건너뛰기

글

라벨이 Visual Studio 2010인 게시물 표시

2015.08: 3D Printed Rototic Hand and Its Remote Control - (리눅스/윈도우즈 소켓 프로그래밍)

립모션을 사용한 로봇손 제어 프로젝트에서 활용하기 위해 소켓 프로그래밍을 구현하게 되었다. 사용자 손 값을 받는 쪽은 윈도우즈 상에 구현되어있고, 로봇 손 하드웨어 제어 부분은 리눅스에 구현되어 있다. 소켓프로그래밍도 기억이 잘 안나고 윈도우즈와 리눅스 사이 통신이 어떻게 되는지 막막했지만, 여러 샘플들이 많이 나와있어서 정리해봤다. 리눅스 서버 #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> void error( char *msg ) {   perror(  msg );   exit(1); } int main(int argc, char *argv[]) {      int sockfd, newsockfd, portno = 27015, clilen;        ///socket      char buffer[512];      struct sockaddr_in serv_addr, cli_addr;           int n;      int iter=0;      int data;      int rBuffer[512];      in...

공부: OpenGL + VS2010 setting

OpenGL (3.2ver) + VS2010 + windows7 (x64 or x86) ///openGL setting for x64. by oh jahwan ///www.scribbleonit.blogspot.com Lib : 각각 x86과 x64에 해당하는 폴더에 넣는다. C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\IA64 C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64 header : 64비트헤더로 넣음 C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\glㅇ dll : x86버전으로 둘다 넣음. C:\Windows\System32 C:\Windows\SysWOW64 you can download the organized zip file. download : OpenGL+VS2010 setting