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

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

 



Thank you Tim for replaying to my question.

> It doesn't matter about the 64-bitness of the computer.  You could be
> running a 32-bit OS.
I am running a 64-bit OS (Red Hat Enteprise Linux 4 WS - update 4) .

> g++ implies -lstdc++ -lm.  If you need those options, something is wrong.
Thanks for info. I have now removed those libraries.

> You can't mix ingredients built with -m64 (default on 64-bit g++/g77)
> with those built with -m32 (which would be the default if you have
> 32-bit OS).  I too would worry somewhat about mixing builds with
> different alignments.  In my experience, the alignment conflict would
> mean either that you have something built with much older tools, or with
> different options, such as -Os (or perhaps explicitly using
> -mpreferred-stack-boundary=3).  The alignment 8 would break any use of
> parallel SSE, including vectorization, in callees (you may not have any
> such).
I have not mixed options (e.g. -Os) or ingredients (-m32) while compiling. To 
stress, I have independently compiled and link the program on two different 
ways. When building and linking without -m32 I have 'only' casting warnings. 
But, if I included -m32 switch I have 'only' alignment problems. Because I have 
a source code of the program I have compiled everything by myself in a way I 
have shown in last e-mail. Due to that I doubt there could be a problem with 
newer/older tools.

> A lot of this depends on what you are trying to do, which you haven't
> specified.  Some of us might advise you to use a current g++ and
> gfortran in place of g77, and to avoid tinkering with the Fortran
> underscoring model, in addition to figuring out your OS version, and
> whether you want 32- or 64-bit compilation, I don't trust any 64-bit g77.

I have tried to replace g77 with g++ and gfortran. With g++ the problems still 
exist. But with gfortran I was not able to link due to too many undefined 
references. Next, I have to use underscoring; otherwise I have problems with 
undefined references.
To conclude I want to be able to compile and link a program without serious 
warnings and this could be either 64 or 32 bit.

Best regards,
Mitja


____________________
http://www.email.si/



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux