开发者

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

开发者 https://www.devze.com 2023-01-30 19:38 出处:网络
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

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开发者_StackOverflow 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?


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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消