473,805 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question on fixing gmp header file so LiDIA can compile

I cannot compile LiDIA mathematical library version 2.1pre5 with the gmp 4.1.2
multiprecision library because the gcc compiler ver 3.2.2 20030222 Red Hat
Linux 9 complains about some structures in the gmp.h header file:

/usr/local/include/gmp.h:2073: declaration of C function `std::ostream&
operator<<(std: :ostream&, const __mpq_struct*)' conflicts with
/usr/local/include/gmp.h:2072: previous declaration `std::ostream&
operator<<(std: :ostream&, const __mpz_struct*)' here
/usr/local/include/gmp.h:2074: declaration of C function `std::ostream&
operator<<(std: :ostream&, const __mpf_struct*)' conflicts with
/usr/local/include/gmp.h:2073: previous declaration `std::ostream&
operator<<(std: :ostream&, const __mpq_struct*)' here
/usr/local/include/gmp.h:2076: declaration of C function `std::istream&
operator>>(std: :istream&, __mpq_struct*)' conflicts with
/usr/local/include/gmp.h:2075: previous declaration `std::istream&
operator>>(std: :istream&, __mpz_struct*)' here
/usr/local/include/gmp.h:2077: declaration of C function `std::istream&
operator>>(std: :istream&, __mpf_struct*)' conflicts with
/usr/local/include/gmp.h:2076: previous declaration `std::istream&
operator>>(std: :istream&, __mpq_struct*)' here
make[1]: *** [bigmod.o] Error 1

How might one fix this problem? Is the gmp.h file not ANSI compliant? I would
like to get LiDIA up and running.

snipped from the gmp.h header -

/*************** * C++ routines *************** */

#ifdef __cplusplus
__GMP_DECLSPEC_ XX std::ostream& operator<< (std::ostream &, mpz_srcptr);
__GMP_DECLSPEC_ XX std::ostream& operator<< (std::ostream &, mpq_srcptr);
__GMP_DECLSPEC_ XX std::ostream& operator<< (std::ostream &, mpf_srcptr);
__GMP_DECLSPEC_ XX std::istream& operator>> (std::istream &, mpz_ptr);
__GMP_DECLSPEC_ XX std::istream& operator>> (std::istream &, mpq_ptr);
__GMP_DECLSPEC_ XX std::istream& operator>> (std::istream &, mpf_ptr);
#endif

what changes need to be made? I am not that familiar with C++ to fix the
problems immediately and would appreciate a more knowledgable person's advice.

Thank you.

Jul 19 '05 #1
0 1812

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
6649
by: Medi Montaseri | last post by:
Hi, Given a collection of similar but not exact entities (or products) Toyota, Ford, Buick, etc; I am contemplating using the Abstraction pattern to provide a common interface to these products. So I shall have an Abstract Base called 'Car' implemented by Toyota, Ford, and Buick. Further I'd like to enable to client to say Car *factory;
16
12551
by: matthurne | last post by:
I just started learning C++ on my own...I'm using Accelerated C++. Something it hasn't explained and I keep wondering about is how header files actually work. I suspect it doesn't get into it because it is, as the authors love to say, "implementation specific". If that's the case, how does the compiler commonly handle them? I use Linux and gcc specifically. Basically, I don't understand how a header file being included makes a...
11
2765
by: Steven T. Hatton | last post by:
In the past there have been lengthy discussiions regarding the role of header files in C++. People have been very adamat about header files serving as in interface to the implementation. I do understand the objective. This example may represent an interface in need of a bit of refactoring, but it goes to demonstrate the basic idea as I understand it. http://developer.kde.org/documentation/library/cvs-api/kdevelop/html/ast_8h-source.html...
6
1755
by: Johannes Bauer | last post by:
Hi group, I've got a question concerning inclusion of .hpp files. Currently I'm including all needed header files in the .cpp file. This means all dependencies of the package and all dependencies of these dependencies and so on. This is quite ugly. A start of an "Example.cpp" file could look like this
55
2798
by: ben | last post by:
is it true that a function without an inline keyword never get inlined? If not true when is it inlined or not? ben
10
5505
by: PCHOME | last post by:
Hi! Would someone please help me thess C error(in gcc on Linux)? The compiler continues to give me: readLP.o: In function `Input_Problem': readLP.o(.text+0x0): multiple definition of `Input_Problem' main.o(.text+0x2f2): first defined here /usr/bin/ld: Warning: size of symbol `Input_Problem' changed from 172 to 185 in
11
1887
by: mdh | last post by:
Well, K& R has finally gotten to header files!!! May I ask this. (Have checked out the FAQ) I am using "Xcode" to compile the program, so it may well be that this is doing something strange. What is unique to a header file? For example, if I define an integer thus:
10
1815
by: dtmfcc | last post by:
My website is at www.simi-therapy.com My CSS is at http://www.simi-therapy.com/simitherapy-screen.css Question -- on the dark blue bar under the beach image, one change caused another unanticipated one, and I can't seem to figure it out. I added the phrase "...an association of independent practitioners", and with some help, got it to align to the right. But now, the blue bar is taller by about the height of the text than I want it to...
12
3023
by: Bryan Parkoff | last post by:
I write my large project in C++ source code. My C++ source code contains approximate four thousand small functions. Most of them are inline. I define variables and functions in the global scope. The global variables and global functions are hidden to prevent from accessing by the programmers. All global functions share global variables. Only very few global functions are allowed to be reusability for the programmers to use. Few...
0
9718
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5544
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.