IBM Visual Age C++ 에서 STL 사용시 엄청난 링크 워닝

yoway의 이미지

IBM Visual Age C++ 에서 STL 사용시 엄청난 링크 워닝

IBM AIX 5.1.0.0 에서 Visual Age C++ 5.0 을 이용해서 작업중에 문제가 생겨서 질문드립니다.
윈도우 환경에서만 작업을 하다가 이번에 유닉스 계열쪽 포팅작업을 하다 IBM AIX에 포팅을 시작하게 되었습니다.
일단 컴파일은 약간의 워닝만 나고 잘 되는데 링크쪽에서 에러는 아니지만 엄청난 수의 워닝이 나타나더군요.
이것저것 간단하게 짜보면서 테스트를 해보니 아무리 봐도 STL을 사용하기만 하면 워닝이 나타나는것 같습니다.
예로 만든 코드를 보여드리면..

우선 vector<int>를 간단하게 랩핑한 IntVector 클래스 해더입니다.

#include <vector>

class IntVector
{
private:
	std::vector<int> v_;

public:
	IntVector();
	virtual ~IntVector();

	void push(int val );
	void clear();
	size_t printall();
};

위 헤더의 cpp파일입니다.

#include "intvector.h"
#include <iostream>
using std::cout;
using std::endl;
using std::vector;

IntVector::IntVector()
{
}

IntVector::~IntVector()
{
	clear();
}

void IntVector::push(int val )
{
	v_.push_back(val);
}

void IntVector::clear()
{
	v_.clear();
}

size_t IntVector::printall()
{
	int idx = 0;
	for( vector<int>::iterator i = v_.begin(); i != v_.end(); i++ )
	{
		cout<<idx<<":"<<*i<<endl;
		idx++;
	}

	return v_.size();
}

그리고 저 IntVector를 사용하고 있는 main.cpp 입니다.

#include "intvector.h"

int main()
{
	IntVector vInt;

	vInt.push(10);
	vInt.push(20);
	vInt.push(30);
	vInt.printall();

	return 0;
}

마지막으로 위의 3개 파일을 컴파일하여 실행파일을 만드는 메이크 파일입니다.

CXX =xlC
CXXFLAG =-g -q64
#TMPLFLAG =-qtempinc
#TMPLDEFINE =-D__USE_STL_TEMPINC__
#TEMPPATH =

.SUFFIXES: .a .o .cpp
.cpp.o:	
		$(CXX) $(CXXFLAG) $(TMPLFLAG) $(TMPLDEFINE) -c $*.cpp

OBJ =		main.o \
		intvector.o

all:	$(OBJ)
	$(CXX) -o out $(CXXFLAG) $(TMPLFLAG) $(TMPLDEFINE) $(OBJ)

clean: 
	rm -f $(OBJ)
	rm -f out
	rm -rf  $(TEMPPATH)

main.o : main.cpp idxvector.h intvector.h
idxvector.o : idxvector.cpp idxvector.h
intvector.o : intvector.cpp intvector.h

이렇게 초 간단한 소스지만 실제 컴파일을 링크시 엄청난 워닝이 나타납니다.

ld: 0711-224 경고: 중복된 기호: .std::allocator<char>::allocator(const std::allocator<char>&)
ld: 0711-224 경고: 중복된 기호: .std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign(const char*,unsigned long)
ld: 0711-224 경고: 중복된 기호: .std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Refcnt(const char*)
ld: 0711-224 경고: 중복된 기호: .std::allocator<char>::deallocate(char*,unsigned long)
ld: 0711-224 경고: 중복된 기호: .std::logic_error::~logic_error()
ld: 0711-224 경고: 중복된 기호: .std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign(const std::basic_string<char,std::char_traits<char>,std::allocator<char> >&,unsigned long,
unsigned long)

워닝은 대충 이런 종류입니다.
STL 및 C++ 라이브러리들이 중복됬다고 나타나더군요.
아무리 봐도 뭔가 컴파일 옵션이라던지 그런걸 잘못 준것 같은데... 몇일동안 문서를 살펴보고 이것저것 해봐도 별반 달라지는게 없더군요 T_T
고수님들의 도움을 부탁드립니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.