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

11,423

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.

Share:
11,423
kd44
Author by

kd44

Updated on June 05, 2022

Comments

  • kd44
    kd44 almost 2 years

    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?