compiling and linking problems on 64-bit (casting & alignment)

Mitja Ursic mitja.ursic@email.si
Sat Oct 6 02:29:00 GMT 2007


Hello,

I have a problem when compiling and linking a program with several hundred C++ 
and FORTRAN files (not done by me:-). I am using GCC version 3.4.6. The 
computer is 64 bit. 

For compiling I am using:
C++: g++ -Dmacros -O -Wno-deprecated -I.   Ipaths  -c yy.cc
FORTRAN: g77 –Dmacros -fno-underscoring -O -Wall -I. Ipaths   -c xx.f

Linking is done with:
g++ aa.o bb.o cc.o -o dd.exe –Lpath  -llibs -lg2c -lstdc++ -lm  

If I compiled as described I received “Warning: cast from pointer to integer of 
different size”, nevertheless linking was successful.
By using the switch –m32 in compiling process the warning was gone. But on the 
other hand I received »Warning: alignment 8 of symbol `s1' in libCpp.a(xx.o) is 
smaller than 16 in libFortran.a(YY.o)« when I was linking (also with –m32).
 
Because it is important for me to trust the results I receive from a program I 
have at least trust to the way I am performing compiling and linking (results 
do depend on compiling and linking process in mine case).

Could anyone give me at least advice how to compile and link on 64-bit computer 
without warnings I gave?

Best regards,
Mitja


____________________
http://www.email.si/



More information about the Gcc-help mailing list