Compiling GMP with Free Pascal

Ben Aguayo info at change7.com
Wed Jul 21 20:35:12 CEST 2004


> > I'm trying to import the GMP.PAS unit, having installed and set the
> > paths to the library, but the compiler shows this error message:
> 
> Where did you get GMP.PAS from? AFAIK all that is available is a unit  
> written for gpc, which is not compatible with fpc.
> 
> > module/unit interface `gmp' could not be imported
> 
> If I can take a look at the source perhaps I can help. If you can  
> provide a pointer (URL) to the GMP.PAS unit I can download and examine  
> it and help with troubleshooting.
> 
> > I'm new both to GMP and Free Pascal (I'm used to work with Delphi)  
> > and
> > I woul really appreciate if some of you can give me some tip about  
> > how
> > to set GMP to work with
> > FreePascal.
> 
> FreePascal comes with an automated h2pas program for converting *.h  
> files into *.pp or *.pas files. Maybe it's handy in this case. I wonder  
> how well it will cope with gmp.h subtleties.

Thank you for taking the time to read and answer my post.

I tried h2pas  but without good results, may be the haders are too complex for the program or I did a mistake.

I'm using Dev+GNU Pascal from Bloodshed software.
They include a gmp.pas unit, you can see it at:

http://www.gnu-pascal.org/gpc/GMP.html#GMP

What is not clear to me is how to compile the program (under Windows) including such library.
I also just found a program from the GMP.PAS author at:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=fjf.19990720021629%40gnu.de&rnum=1&prev=/groups%3Fq%3Dfree%2Bpascal%2Bgmp%26hl%3
Den%26lr%3D%26ie%3DUTF-8%26selm%3Dfjf.19990720021629%2540gnu.de%26rnum%3D1

Still searching and testing. If I find some way to do what I need (use GMP from Free Pascal or Delphi) I will let all you know.

Thanks,
Ben Aguayo



More information about the gmp-discuss mailing list