Programming

사내 HP-UX 서버에서 컴파일을 하다, 아래의 Warning 이 나왔다. Warning (suggestion) 887: “SharedMemory.cpp”, line 711 # Type ‘int’ is smaller than type ‘unsigned long’, unwanted widening in value may result.        memset(szTotalHexData, 0x00, (iSize * 3) + 1);                                      ^^^^^^^^^^^^^^   이유인즉, unsigned long type 이 와야 하는데, int type 이 왔다는 것. 이상할 것이 없어서 memset […]

Continue reading about size_t warning. int’ is smaller than type ‘unsigned long

C++ 에서의 자료형의 크기는 컴파일러에 따라 좌우된다고 알고 있었다. 틀린 내용은 아니였지만.. 정확하지는 않았다. 아래 링크에서 정확한 내용을 알 수 있었다. 정확하게는… 크기는 정해져 있지 않지만, C++ 표준에서 지정하는 최소 사이즈가 있다는 것이다. The C++ standard does not specify the size of integral types in bytes, but it specifies minimum ranges they must be able […]

Continue reading about C++ Int, char, double, 등등의 자료형 사이즈..

pchero on September 27th, 2012

  IPC 를 위해 MessageQueue 를 사용해야 했다. 그런데 문제는 msgsnd 시스템 함수를 통해 데이터를 보낼려고 하는데 자꾸 에러가 나는것.. [22:17:29.537][/home/jonathan/workspace/19.Projects/CUTE/source/oxdsagent/queuectl.cpp,232]<ERR>Queue Create Failed. Queue Already Created. Id[4653059] [22:17:29.537][/home/jonathan/workspace/19.Projects/CUTE/source/oxdsagent/queuectl.cpp,217]<ERR>Queue Create Failed. Invalid Queue Key[-1] [22:17:29.537][/home/jonathan/workspace/19.Projects/CUTE/source/oxdsagent/queuectl.cpp,217]<ERR>Queue Create Failed. Invalid Queue Key[1215752192] [22:17:29.537][/home/jonathan/workspace/19.Projects/CUTE/source/oxdsagent/queuectl.cpp,224]<ERR>Queue Create Failed. Invalid Queue Size!! Size[1215752192] [22:17:29.537][/home/jonathan/workspace/19.Projects/CUTE/source/oxdsagent/queuectl.cpp,283][3]<INF>Queue Create Success!! Input Key[494949], Size[10000] => Created Key[494949], […]

Continue reading about 메시지 큐 타입 관련.. msgsnd

pchero on April 2nd, 2012

  컴파일 도중 아래의 에러를 발견했다. TuSelector.cxx:220:16: error: ‘INT_MAX’ was not declared in this scope TuSelector.cxx:222:1: warning: control reaches end of non-void function 해당 파일에 다음의 헤더파일을 추가하면 된다. #include <climits>  

Continue reading about error: ‘INT_MAX’ was not declared in this scope

pchero on April 2nd, 2012

오픈소스 컴파일 중, 다음과 같은 에러 메시지를 발견했다. error: ‘EOF’ was not declared in this scope make[1]: Entering directory `/home/jonathan/workspace/13.CIDS/CIDSSip/SipLibrary/resiprocate-1.6/rutil’ g++         -march=i686 -D_REENTRANT  -g  -Wall  -I.. -I../build/../contrib/ares -DOS_MAJOR_VER=2 -DOS_MINOR_VER=6 -DOS_POINT_VER=38-13-generic-pae -DOS_PATCH_VER=0 -DRESIP_OSTYPE_LINUX -DRESIP_ARCH_I686 -DRESIP_LARCH_IA32 -DRESIP_TOOLCHAIN_GNU -DUSE_ARES -c -o obj.debug.Linux.i686/SysLogBuf.o SysLogBuf.cxx SysLogBuf.cxx: In member function ‘virtual int resip::SysLogBuf::overflow(int)’: SysLogBuf.cxx:39:13: error: ‘EOF’ was not declared in this […]

Continue reading about error: ‘EOF’ was not declared in this scope