0

I have only used Xcode 3 for self-contained programs. This time though I have to use a Big Number library. I've downloaded gmp and tried to link it with Xcode 3. To be honest I mostly have no clue what I'm doing. Can you guys explain thoroughly how to link a Big Number library like gmp so I can use it to calculate huge numbers?

Edit: I am working in C++ and I need to be able to do any mathematical operation, like addition, square root, exponent and so forth

ameltz
  • 43
  • 6

1 Answers1

1

There are a bunch of ways to incorporate that code depending on depended use and desired platforms. But this seems like a pretty solid starting point.

https://github.com/bmorton/GMPInt

If this is not want you want can you tell us what language and platform you are working with?

madmik3
  • 6,975
  • 3
  • 38
  • 60
  • Good point, I'm working in C++ and I want to be able to do any mathematical operation on the number. i.e addition, square root, exponent and so forth. I'll add that to the description – ameltz Sep 24 '12 at 19:17
  • you don't have to link the lib. the c source is included in the release. you can still use the dynlib or you can create a .a and link to it. more on linking a .a here http://stackoverflow.com/questions/445815/linking-libraries-in-xcode – madmik3 Sep 24 '12 at 19:24
  • Just to be sure I get that right, gmp is included in Xcode 3 using C++? Or some big number library is included in Xcode 3 (using C++)? So then in that case I could just include the headers I want, right? – ameltz Sep 24 '12 at 19:31
  • GMP provides C code (how it's written.) You can just add that code to your project and call it directly. – madmik3 Sep 24 '12 at 19:50
  • The thing is there are a lot of files to include, there are 37 .c files not counting the ones in folders. Do you know of any implementation like your github link but for C++? – ameltz Sep 25 '12 at 02:27