NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: gcc with helloworld for 64bit ?



> Datum: Sat, 05 May 2012 16:50:01 +0200
>
> Hello
> 
> Try to compile on me Powermac G4 simple hello world for running on me
> windows7 64bit machine. after reading man g++/gcc this are possible with 
> syntax
> -m64 if trying this i have following result from compiler. Or its this
> possible if me system not supporting the archidekture from 64Bit?
> 
> i think this options should be possible, please what are me mistake here?
> the compilation with "-m32" are compiling fine but this don't run on me
> windows7 machine "not a valid 64bit"
> 
> powermac$ g++ -m64 ./helloworld.c
> ./helloworld.c:1: error: -m64 not supported in this configuration
> 
> -helloworld.c
> #include <iostream.h>
> main()
> {
>  cout << "Hello World" << endl;
>  return 0;
> }
> 
> powermac$ gcc --v
> Using built-in specs.
> Target: powerpc--netbsd
> Configured with: /usr/src/tools/gcc/../../gnu/dist/gcc4/configure
> --enable-long-long
> --disable-multilib --enable-threads --disable-symvers
> --build=x86_64-unknown-netbsd4.99.72
> --host=powerpc--netbsd --target=powerpc--netbsd --enable-__cxa_atexit
> Thread model: posix
> gcc version 4.1.3 20080704 prerelease (NetBSD nb2 20081120)
> 
> NetBSD powermac.G4 5.1 NetBSD 5.1 (GENERIC) 
> 
> please what i need to do for any successful result.
> thanks for any feedback
> regards
> mauri
> 

with this possible switch the compilation running on powermac.g4 without 
problem.

CFLAGS="-arch x86_64 -arch i386" g++ -o pot64bit ./potenzieren.c
but stil don't run on me windows 64bit machine

if trying 
CFLAGS="-arch x86_64 -arch i386" gcc -o pot64bit ./potenzieren.c
here me compiler don't found the included files

powermac$ CFLAGS="-arch x86_64 -arch i386" gcc -o pot64bit ./potenzieren.c

./potenzieren.c:4:42: error: iostream: No such file or directory
./potenzieren.c:7: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'namespace'
./potenzieren.c: In function 'main':
./potenzieren.c:24: error: 'cout' undeclared (first use in this function)
./potenzieren.c:24: error: (Each undeclared identifier is reported only once
./potenzieren.c:24: error: for each function it appears in.)
./potenzieren.c:24: error: 'endl' undeclared (first use in this function)

thanks for any feedback
regards
Mauri

-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                          
        
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a


Home | Main Index | Thread Index | Old Index