LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Facing error while running "g++ 3.4.4" code in "g++ 4.3.3" (http://www.linuxquestions.org/questions/ubuntu-63/facing-error-while-running-g-3-4-4-code-in-g-4-3-3-a-760001/)

Suranjit 10-06-2009 04:23 AM

Facing error while running "g++ 3.4.4" code in "g++ 4.3.3"
 
Hi,

I have to compile some cpp codes which were written in "g++ 3.4.4". But now I am using Ubuntu 9.04 (which uses g++ 4.3.3) and whenever I tried to compile those code I found some errors like "... : error: expected `)' before * token".

I was not able to find out any problem in that code. Can anyone please suggest me what to do?

By the way, those codes are implementation of some Broadcast Algorithms for ns-2.29 distribution that I have analyze.

Thanks,
Suranjit

clvic 10-06-2009 06:59 AM

I remember that ns2 has some problems with gcc4. You could give a look at the list of changes to see whether there's some problem in your code that arose with gcc4 (http://gcc.gnu.org/gcc-4.3/changes.html).
You should also remember to re-run the "configure" scripts when changing the compiler.

If everything fails, you can install a copy of gcc3 and use that one, using the sources downloadable from gcc's site, is not that difficult to rebuild gcc if you're used to build ns.

Suranjit 10-08-2009 11:22 PM

Quote:

Originally Posted by clvic (Post 3709437)
I remember that ns2 has some problems with gcc4. You could give a look at the list of changes to see whether there's some problem in your code that arose with gcc4 (http://gcc.gnu.org/gcc-4.3/changes.html).
You should also remember to re-run the "configure" scripts when changing the compiler.

If everything fails, you can install a copy of gcc3 and use that one, using the sources downloadable from gcc's site, is not that difficult to rebuild gcc if you're used to build ns.

Thanks for you reply. I tried to install gcc3.4.4 but I have failed to install (I could not build it). Even I installed gcc4.1 but when I checked in the console ($ g++ -v), it said that g++ is not installed. Then again I installed gcc4.3 and then it showed that g++ was ok now.... Now I'm trying to change my codes. Thanks by the way.

Regards,
Suranjit


All times are GMT -5. The time now is 04:35 PM.