We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Compiling Problems

Fireman54 asked
Medium Priority
Last Modified: 2010-04-21
First off I want to say that I'm a novice at this.

I'm trying to compile a software program and it worked perfect before with RHEL 3, gcc 3.2.3. Here's a small history.

1) When compiling in the past with gcc 3.2.3 the person that wrote the software said he wrote it using gcc 3.3 and 3.4, so he used this to be compatable with gcc 3.2.3.

perl -pi -ne 's/atomic_word\.h/atomicity.h/' ./*.h ./*.cc

2) The problem is... I'm now on RHEL 4, with gcc 3.4.5 and it's not compiling. I did run up2date -i compat-libstdc++-33 to install gcc 3.2.3 but it's not picking that up either.

I apologize for rambling here, but I want to be sure I'm explaining this properly.

Watch Question

Top Expert 2005

And what's the error while compiling?
It's common, that each next version of gcc is more strict on c++ standads(syntax).


[root@domain emse]# make
make  all-recursive
make[1]: Entering directory `/root/respondatamailer/fum/emse'
Making all in src
make[2]: Entering directory `/root/respondatamailer/fum/emse/src'
source='main.cc' object='main.o' libtool=no \
depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/mysql/include/mysql  -O3 -fomit-frame-pointer -DHOSTNAME_CHECK='"srv9.net"' -DWEBDOMAIN='"srv9.net"' -DMAILDOMAIN='"srv9.net"' -c -o main.o `test -f 'main.cc' || echo './'`main.cc
In file included from mailq.h:12,
                 from main.cc:17:
cmd.h:13: error: explicit qualification in declaration of `void emse::cmd::list_emails(i::conn*, std::string)'
cmd.h:15: error: explicit qualification in declaration of `void emse::cmd::fini()'
make[2]: *** [main.o] Error 1
make[2]: Leaving directory `/root/respondatamailer/fum/emse/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/respondatamailer/fum/emse'
make: *** [all] Error 2
Top Expert 2005

> explicit qualification in declaration of `void emse::cmd::list_emails(i::conn*, std::string)'
You can't declare member of one namespace in another one(it was possible earlier)
namespace B {
        int A::f();     // Declaration
What is declared. Is it B::A::f(), or B::f()? That's why it's forbidden.

Either compile using older gcc or ask the author of the code to fix it, or fix it by Yourself.


I have no way of getting ahold of the author. So compiling it with gcc 3.2.3 would work for me.

I don't know if you remember me from the other day when you gave me the answer... up2date -i compat-libstdc++-33 . So I have gcc 3.2.3 on my server. The problem is, I don't know how to tell this program how to grab the gcc 3.2.3 instead of the gcc 3.4.5.

Top Expert 2005
> The problem is, I don't know how to tell this program how to grab the gcc 3.2.3 instead of the gcc 3.4.5
up2date -i compat-gcc-32 compat-gcc-32-c++
then instead gcc or g++ You have to call gcc32 or g++32

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Ok, I ran up2date -i compat-gcc-32 compat-gcc-32-c++

Now please tell me how to call gcc32 or g++32 when compiling. I'm real new at this (very new), I don't know where to call it from.



Ravenpl... gcc and g++ are both referenced in the 'configure' file. Is this where I'll be changing it, and which one... gcc or g++ ?
Top Expert 2005

If You use it with configure, try
CC=gcc32 CXX=g++32 ./configure more options
otherwise edit makefile and change gcc calls

Also, You may change the configure scipt itself (as You suggested) - change both gcc & g++


Ravenpl... Thank you very much, it worked perfectly.

Top Expert 2005

Glad I could help
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.