Error: unknown pseudo-op: `.weakref'

It's really strange that I have these error messages as follows when I tried to compile the C++ program.

g++ -c -pipe -DOpenModeType=std::_Ios_Openmode -g -I. -o Obj/NP_genome_info.o NP_genome_info.cpp
{standard input}: Assembler messages:
{standard input}:10: Error: unknown pseudo-op: `.weakref'
{standard input}:11: Error: unknown pseudo-op: `.weakref'
{standard input}:12: Error: unknown pseudo-op: `.weakref'
{standard input}:13: Error: unknown pseudo-op: `.weakref'
{standard input}:14: Error: unknown pseudo-op: `.weakref'
{standard input}:15: Error: unknown pseudo-op: `.weakref'
{standard input}:16: Error: unknown pseudo-op: `.weakref'
{standard input}:17: Error: unknown pseudo-op: `.weakref'
{standard input}:18: Error: unknown pseudo-op: `.weakref'
{standard input}:19: Error: unknown pseudo-op: `.weakref'
{standard input}:20: Error: unknown pseudo-op: `.weakref'
{standard input}:21: Error: unknown pseudo-op: `.weakref'
{standard input}:22: Error: unknown pseudo-op: `.weakref'

I have no idea what is wrong. Is it due to my program or something else. I hop it the latter.

Thank you very much.

i guess you are using the lastest gcc (please post gcc --version next time). but i thing your bug is know already. please check this:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26966

I checked the version of gcc.

Thread model: posix
gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)

The link you gave me is a little overwheming to me. Sorry, I'm a beginner. :frowning:

this link suggests you need a newer version of binutils.

Thank you very much.

One thing I don't understand is that why it just appears to have a problem of 'old version' now because it worked fine last week. :confused:

Also, where can I find/download the newer 'binutils'?
Can I just update the 'binutils' on top of the current version of 'Redhat'?

Sorry for a little naive question. :o

The exact same code, worked fine last week? Or different code worked fine? The weakrefs thing has to do with using a nonstandard feature in a slightly nonstandard way.

Redhat uses RPM packages to install and upgrade software. The command for installing these packages is 'rpm', see 'man rpm' for details. You can find these packages with http://rpmfind.net/ . the binutils package is called, bafflingly, 'binutils'.

Thank you so much for your great help. :smiley:

Yes, exactly the same code, same program. Strange, isn't it?