Compiling Problems

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.

Thanks,
Fireman54
Fireman54Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ravenplCommented:
And what's the error while compiling?
It's common, that each next version of gcc is more strict on c++ standads(syntax).
Fireman54Author Commented:
[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
ravenplCommented:
> 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)
Consider:
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.
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Fireman54Author Commented:
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.

ravenplCommented:
> 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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Fireman54Author Commented:
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.

Thanks,
Fireman54Author Commented:
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++ ?
ravenplCommented:
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++
Fireman54Author Commented:
Ravenpl... Thank you very much, it worked perfectly.

ravenplCommented:
Glad I could help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux OS Dev

From novice to tech pro — start learning today.