LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-29-2006, 06:03 PM   #1
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Rep: Reputation: 30
help compiling this C++ code


Hi,

I am trying to compile code with the Click software router which is in c++. I am getting the following errors:
Code:
g++-3.2.1 -DHAVE_CONFIG_H -I../include -I../include -I. -I..  -DCLICK_USERLEVEL -g -O2  -c ../elements/local/cmp.cc
../elements/local/cmp.cc: In function `int __gmpz_cmp(const __mpz_struct*,
   const __mpz_struct*)':
../elements/local/cmp.cc:36: declaration of `int __gmpz_cmp(const
   __mpz_struct*, const __mpz_struct*)' throws different exceptions
../elements/local/gmp.h:671: than previous declaration `int __gmpz_cmp(const
   __mpz_struct*, const __mpz_struct*) throw ()'
make: *** [cmp.o] Error 1
Here is cmp.cc:
http://www.rafb.net/paste/results/Wsytav71.html

and gmp.h:
http://www.rafb.net/paste/results/LSCP9670.html

Thanks!
George
 
Old 11-30-2006, 11:44 PM   #2
asgeirss
Member
 
Registered: Aug 2003
Location: Vancouver, Canada
Distribution: RH, SL
Posts: 37

Rep: Reputation: 15
Hi George,

Your links don't seem to work, I can't read the source files.

Basically the error means that gmpz_cmp is using different sets of exceptions... Were the two files distributed together?

If they were not distributed in one package, then it might be a version incompatibility. Otherwise, you could always try editing one of the
two source files so that the 'throw' statements are the same.

Good luck.
- Dave
 
Old 11-30-2006, 11:45 PM   #3
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Original Poster
Rep: Reputation: 30
ahhh, i got it working... there was an #ifdef that was breaking things... the function prototype was not matching the function being compiled.

Thank you very much

- George
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
c++ code compiling error k1ll3r_x Programming 4 10-03-2006 02:41 AM
compiling c code in SuSe 10 ?! mmattax Linux - Newbie 7 02-09-2006 07:58 PM
compiling C code vose Programming 29 10-08-2004 07:28 AM
Compiling Kernel Code vbhatia_81 Programming 1 06-21-2004 06:53 AM
compiling code ripmaster Linux - Software 2 03-06-2004 09:07 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration