You are here:

C/linking to gmp in dos

Advertisement


Question
In the manual for the GNU Multiple Precision Arithmetic Library, it states, "All programs using GMP must link against the 'libgmp' library. On a typical Unix-like system this can be done with '-lgmp', for example gcc myprogram.c -lgmp."

I've succeeded in installing GMP on my computer that uses DOS. What does the typical command line for compiling a program linking to GMP look like in DOS? Nothing I've tried works.

Answer
Which compiler?
If you are using DOS/Windows, then you must be using some GUI also.
Then in one of the options, you will be allowed to add the library and its path.

If you are using gcc on DOS, then the command must be similar to Unix.

-Narendra

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Narendra

Expertise

I can answer questions in C related to programming, data structures, pointers and file manipulation. I use Solaris for doing C code and if you have questions related to C programming on Solaris, I will be able to help better.

Experience

6.5

Organizations belong to
Sun Microsystems

Awards and Honors
Brain Bench Certified Expert C programmer.
Advanced System Software Certified

©2012 About.com, a part of The New York Times Company. All rights reserved.