“/opt/aCC/include_std/utility”, line 99: error #2070: incomplete type is not allowed

HP 장비에서 aCC 로 컴파일을 하던도중 아래의 에러가 발생했다.

“/opt/aCC/include_std/utility”, line 99: error #2070: incomplete type is not
allowed
first_type  first;
^
detected during:
instantiation of class “std::pair<_TypeT, _TypeU> [with
_TypeT=const std::string, _TypeU=char *]” at line 97 of
“/opt/aCC/include_std/rw/tree”
instantiation of class “__rw::__rw_rb_tree_node<_Alloc, _Val,
_Key, _KeyOf> [with
_Alloc=std::allocator<std::pair<const std::string, char
*>>, _Val=std::pair<const std::string, char *>,
_Key=std::string,
_KeyOf=__rw::__select1st<std::pair<const std::string,
char *>, std::string>]” at line 282 of
“/opt/aCC/include_std/rw/tree”
instantiation of class “__rw::__rb_tree<_Key, _Val, _KeyOf, _Comp,
_Alloc> [with _Key=std::string, _Val=std::pair<const
std::string, char *>,
_KeyOf=__rw::__select1st<std::pair<const std::string,
char *>, std::string>, _Comp=std::less<std::string>,
_Alloc=std::allocator<std::pair<const std::string, char
*>>]” at line 102 of “/opt/aCC/include_std/map”
instantiation of class “std::map<_Key, _TypeT, _Compare,
_Allocator> [with _Key=std::string, _TypeT=char *,
_Compare=std::less<std::string>,
_Allocator=std::allocator<std::pair<const std::string,
char *>>]” at line 54 of “LocalRepository.h”

이유인즉, HP 컴파일러 aCC 가 버전 6로 넘어오면서 기존(aCC version 5)에서 허용했던 C++ 타입에 대한 처리를 더이상 허용하지 않으면서 발생한 문제였다.

관련링크 : http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2708d7c682f02110d7c682f02110275d6e10RCRD#_iso-39._acc6_detects_instantiation_

공식 문서내용은 다음과 같다.

ISO-39. aCC6 detects instantiation conflicts earlier (2403)

Points of instantiation differ for member functions, so reporting of instantiation conflicts can differ. This is simply a behavior difference, and not a compatibility issue. However, the following code snippet illustrates an incompatibility in the use of repeated const keywords, which aCC5 allows and aCC6 does not. To fix this code, don’t instantiate the template with a const int; simply use int:

template <class T>
struct S {
void foo(T *i) {}
void foo(const T *i) {}
};
int main() {
int i = 5;
#ifdef WORKS_IN_BOTH
S<int> s;
#else
S<const int> s;
#endif
return 0;
}

내용인즉, C++ 에서 template 사용시 const 를 사용하지 말라는 뜻이다.

위의 에러에서 문제가 해당 라인(line 54 of “LocalRepository.h”)을 찾아가보니 아래와 같이 선언되있었다.

map<string, char*> m_mapStringMainData;

뭔가 이상했다. map 선언 중, 어디에도 const 는 있지 않았다. 어찌된 일일까.

한참을 헤매고 주위에 도움을 구해서 찾아낸 정답은 정말 엉뚱한 곳에 있었다.
바로 iostream 였다.

다음의 라인을 추가하여 깔끔히 문제를 해결할 수 있었다.

#include <iostream>

왜 이런 문제가 생긴 것일까? 조금 더 질문을 해본 결과 한가지 재미있는 사실을 알 수 있었다.
이전 버전의 aCC 에서는 iostream 을 include 하면 또 안된다는 것..

아직 배워야할 것이 많다..

HP-UX Hardwar/OS support & CPU/OS support

Unix 는 장비도 다양하고,  버전도 다양하다.

HP UX에 관련한 Hardware/OS support 에 관한 리스트는 아래의 링크에서 찾을 수 있다.

http://www.hp.com/go/hpuxservermatrix

그리고 다른 HP UX 에 관한 CPU/OS support에 관한 내용은 아래의 링크에서 찾을 수 있다.

http://search.cpan.org/~rjbs/perl-5.12.3/README.hpux

트레버 – 열두살 소년의 아름다운 제안

도서 : 트레버(356p)

저자 : 캐서린 라이언 하이디 지음, 공경희 옮김

등록일 : 2011/02/23

서평 : 열두 살 소년의 세상 바꾸기.

열 두살 소년이 무엇을 할 수 있을까?

소년의 담임 루벤은 어느 날 다음의 과제를 낸다.

“세상을 바꿀 수 있는 아이디어를 생각하고, 실천에 옮기시오.”

소년의 생각은 “다른 사람에게 베풀기”.

단순하지만 실천하기에는 약간은 어려운 이 생각은 사람들은 처음에는 무척이나 어려워한다.

심지어는 그의 어머니 조차도 이해하지를 못한다.

누구도 알아주지 않고, 누구도 도와주는 사람없이 한 사람, 한 사람.. 어린아이의 시각으로 자신이 할 수 있는.

자신의 도움을 필요로하는 사람들을 찾아서 자신의 생각을 이야기하고 그들을 돕기 시작한다.

그리고 얼마 후, 대부분의 사람들은 이 생각에 동참하게 된다.

정말 동화같은 이야기이다. 책이니까 가능한 이야기다.

그런데.. 정말로 이 생각이 실현된다면 얼마나 좋을까..

평점 : ★★★★

Changing gnome ternimal title on ubuntu linux

그놈 터미널을 사용하던 중, 터미널의 제목이 변경되지 않는 문제점을 발견했다.

평소에는 신경쓰지 않다가 꼭 한번씩 여러개의 창을 동시에 띄워 놓았을때, 헷갈려서 제대로 된 작업 공간을 찾기까지 꽤나 여러번 창을 이동해야 했던 불편함이 있었다.

며칠을 미루다 이번에 변경을 하여 그 내용을 포스팅한다.

간단하다. 위의 그림 처럼 자신의 홈디렉토리 내에 .bashrc 파일의 제일 아래쪽에 아래의 라인을 추가해주면 된다.

PROMPT_COMMAND=’echo -ne “33]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}07″‘

WordPress Error – Fatal error: Cannot redeclare class Facebook in /wp-content/plugins/simple-facebook-connect/facebook-platform/facebook.php

워드 프레스를 사용하던 중 아래와 같은 에러를 발견하였다.

WordPress Error – Fatal error: Cannot redeclare class Facebook in /wp-content/plugins/simple-facebook-connect/facebook-platform/facebook.php

관리자 계정으로 로그인 하여 글을 수정 하려고 했는데 위와 같은 에러가 발생하면서 로그인이 안되는 현상이었다.

에러 메시지의 원인은 메시지 내용에 나타나있었다. Facebook 관련된 플러그인에서 오류가 발생하여 로그인을 할 수 없다는 내용이다. 오류가 발생한 이유는 중복 선언.

구글링 후 해결방법을 찾을 수 있었다. 내용인즉, 설치된 두개 이상의 페이스북 플러그인이 서로 작동하면서 충돌이 일어난 것이란다.

웹서버에 ssh 접속후, 에러가 발생한 플러그인 디렉토리를 다른 이름으로 변경 후, 다시 접속을 하니 정상적으로 로그인이 되었다.

로그인 후, 문제가 발생한 플러그인을 삭제하여 문제를 해결하였다. 🙂