In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to compile Linux/Unix code in Windows. It is very detailed and has certain reference value. Friends who are interested must finish reading it.
* step: download and install the new version of Cygwin software. The official website of the software: http://cygwin.com/
The function of Cygwin software is to let Windows have the software of Unix-like environment. So compilers such as GCC will naturally be included. For developers, however, Cygwin is a development environment. For users, Cygwin is a running environment.
Note: to compile C++ or C programs, you need to select gcc-core,gcc-g++,make under the Devel option and glib2,glib2-devel,glib2-runtime under the Lib tab during installation.
Step 2: modify the cygwin.bat file.
Locate the cygwin .bat file in the cygwin project installation directory and open it in notepad. Modify it to the following form:
@ echo off
C:
Set CYGWIN=tty notitle glob
Set PATH=%PATH%;c:\ cygwin\ bin;c:\ cygwin\ sbin;c:\ cygwin\ usr\ bin;c:\ cygwin\ usr\ sbin;c:\ cygwin\ usr\ local\ bin
Set LD_LIBRARY_PATH=c:\ cygwin\ lib;d:\ cygwin\ usr\ lib;c:\ cygwin\ usr\ local\ lib
Chdir C:\ cygwin\ bin
Bash-login-I
The red part is the newly added part, be careful to change the path inside to your own installation path.
Step 3: compile the software using Gmail + in Cygwin.
Under the Cygwin installation directory, run cygwin.bat to start the cygwin environment. Use cd / cygdrive/... after environment startup Enter the folder where your project is located (. Represents the project directory, such as: cd / cygdrive/d/testProject/). Once you have entered the directory, you can compile the code using the glisten + command, which can be used by typing grub +--? Command to understand. General online projects have a makefile file, if you download the project happens to have this file, you are lucky, you can directly type the make command in the ygwin environment to compile the entire project. By now the software should have been compiled successfully.
Step 4: run the software.
The software is run with the following form of command:. / testProject-parameter. In addition, if you need to enter data in the cygwin environment, ctrl+ d indicates the end of the input in the linux environment (in windows, press enter again).
The above is all the contents of the article "how to compile Linux/Unix code in Windows". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.