kd44
kd44

Reputation: 117

how to compile c++ files with cygwin on windows 7

I have installed cygwin. But when I try to compile a c++ file it gives the following error:

/usr/lib/gcc/i686-pc-cygwin/4.3.4/cc1plus.exe: error while loading shared libraries: cygmpfr-1.dll: cannot open shared object file: No such file or directory

I checked in the lib folder there is no library with the name cygmpfr-1.dll. So is it that I have to put that dll in the lib folder. I have tried to search for the dll but could not find this dll so that i can download. I am just a beginner in C++. I have tried to setup cygwin support in netbeans as well, but there also if I try to run the sample files given, it throws the above error.

Can anybody give me a clue?

Upvotes: 2

Views: 11577

Answers (3)

Robert Shuler
Robert Shuler

Reputation: 1

I have had similar problems and I am no beginner. Try using the cygwin installer, and searching it for all versions of gmp. There generally are 32bit and 64 bit versions. Check everything you see and update your installation. Hope this helps. Some of these dll's you can find on the internet, but not the one you are looking for.

Upvotes: 0

rurban
rurban

Reputation: 4131

You need to install the gcc4-g++ package via http://cygwin.com/setup.exe You only have gcc4 installed.

This will also install your missing dependencies.

Upvotes: 4

Cheeso
Cheeso

Reputation: 192627

If you're a beginner in C/C++, and you're running Windows, then why not take the simple route and get Visual-C++ Express, a free IDE from Microsoft for Windows.

It provides a GUI IDE (Integrated Development Environment), but if you prefer a text editor and command-line tools (compilers, debuggers, etc) those are available to you also, if you install Visual-C++ Express.

There are also tutorials and lessons to get you started.


On the other hand, if you really wanna focus on C++ on Linux, then you should probably uninstall Windows 7 right now.

Upvotes: 0

Related Questions