Operating System - HP-UX
1824809 Members
4277 Online
109674 Solutions
New Discussion юеВ

g++ 64 bit compile option?

 
Tony I.S Suh
Occasional Contributor

g++ 64 bit compile option?

successful install gcc64
but...

try this:
kmts@root::/usr/local/pa20_64/bin>file gcc
gcc: ELF-64 executable object file - PA-RISC 2.0 (LP64)
kmts@root::/usr/local/pa20_64/bin>file g++
g++: ELF-64 executable object file - PA-RISC 2.0 (LP64)

#gcc -o test test.c
#file test
test: ELF-64 executable object file - PA-RISC 2.0 (LP64)

#g++ -o test test.cpp
/usr/local/pa20_64/include/c++/3.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated.

do you know g++ 64 bit compile option?
cyber_dol
2 REPLIES 2
H.Merijn Brand (procura
Honored Contributor

Re: g++ 64 bit compile option?

If your gcc/g++ is ELF 64, it can *only* produce 64bit code. You need a seperate gcc/c++ to produce 32bit code. There is no option (yet) to switch from 32 to 64 bit or back.

There /is/ an option to switch architecture, and it /does/ have effect: -mpa-risc-2-0 / -mpa-risc-1-1 (or something like that) check with 'gcc -v --help'
Enjoy, Have FUN! H.Merijn
Tony I.S Suh
Occasional Contributor

Re: g++ 64 bit compile option?

I'm success..
test code is bad

bad code
#include
int main()
{
cout <<"test\n";
return 0;
}

success code
#include
int main()
{
using namespace std;
cout <<"test\n";
return 0;
}
cyber_dol