HPUX에서 g++ 3.3.1 과 ld 문제

pynoos의 이미지

#include <iostream.h>

int main()
{
        cout << "Hello?" << endl;
        return 0 ;
}

이런 코드조차..

$ g++ a.cc
/usr/ccs/bin/ld: Unrecognized argument: +init
/usr/ccs/bin/ld: Usage:  /usr/ccs/bin/ld [options] [flags] files
collect2: ld returned 1 exit status

이렇게 나오는데... 문제 있는거 아닌가요?

uname -a
HP-UX hpux B.11.11 U 9000/800 135221790 unlimited-user license

이며,

$ g++ --version
g++ (GCC) 3.3.1
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

입니다.

GOOGLE에서 같은 이유로 검색된 곳은..
http://gcc.gnu.org/ml/gcc/2003-05/msg02427.html

http://www.tek-tips.com/gviewthread.cfm/lev2/4/lev3/32/pid/208/qid/681230

지리즈의 이미지

[url]http://gcc.gnu.org/install/specific.html#hppa*-hp-hpux11[/url]

Quote:
GCC 3.3 nows uses the ELF DT_INIT_ARRAY and DT_FINI_ARRAY capability to run initializers and finalizers on the 64-bit port. The feature requires CVS binutils as of January 2, 2003, or a subsequent release to correct a problem arising from HP's non-standard use of the .init and .fini sections. The 32-bit port uses the linker +init and +fini options. As with the support for secondary symbols, there have been bugs in the order in which these options are executed by the HP linker. So, again a recent linker patch is recommended.

라네요...

There is no spoon. Neo from the Matrix 1999.

pynoos의 이미지

감사합니다....

결국 binutils를 사용하거나 HPUX의 PHSS_24304 를 받아 패치해야하는군요...