问题描述
我学习(当然,试图)C的权利,但我仅限于在Windows XP中工作。我已经成功地建立并学习如何使用Emacs和可以编译简单的C程序与海湾合作委员会(从Emacs的不能少!),但我得到的地方,我想安装类似SDL玩围绕点用它。
I'm studying (well, trying to) C right now, but I'm limited to working in Windows XP. I've managed to set up and learn how to use Emacs and can compile simple C programs with gcc (from Emacs no less!), but I'm getting to the point where I'd like to install something like SDL to play around with it.
问题是,对SDL的安装说明表明,使用MingW平台在Win32环境下,我将需要使用MSYS来运行./configure并/使install安装SDL,就像人会在Linux上做的。我注意到,当我解压SDL-dev软件包(忘了确切的名字,抱歉)有文件夹中有没有对应的文件夹中MinGW的目录(SDL /包括 - >的MinGW /包括)。
The thing is that the installation instructions for SDL indicate that, on a Win32 environment using MingW, I would need to use MSYS to run ./configure and make/make install to install SDL, like one would do on Linux. I noticed that when I unzipped the SDL-dev package (forgot the exact name, sorry) there were folders there that corresponded to a folder in the MinGW directory (SDL/include -> MinGW/include).
难道我说得对,所有的./configure和make命令做的是从一个目录移动这些文件到另一个?我不能只是用手移动这些文件,并不遗余力自己安装和配置MSYS的麻烦(这,说实话,混淆了我很大的)?
Am I right in saying that all the ./configure and make commands do is move these files from one directory to another? Couldn't I just move those files by hand and spare myself the trouble of installing and configuring MSYS (which, to be honest, confuses me greatly)?
推荐答案
构建过程通常是这样的:配置脚本找到适当的设置为编辑(如哪些功能启用的路径所需要的库,这编译器使用等),并据此创建一个Makefile。使然后编译源$ C $ C到二进制文件。使安装副本创建的二进制文件,头和其他文件属于库中适当的地方。
The build process usually works like this: the configure script finds the appropriate settings for the compilation (like which features to enable, the paths to the required libraries, which compiler to use etc.) and creates a Makefile accordingly. make then compiles the source code to binaries. make install copies the created binaries, the headers, and the other files that belong to the library to the appropriate places.
您不能只是将文件从源存档复制,因为源压缩文件不包含二进制文件(或者是在化妆步骤中创建的任何其他文件),所以你会复制将是头,这是不够用的库。
You can't just copy the files from the source archive, because the source archive does not contain the binary files (or any other files that are created during the make step), so all you'd copy would be the headers, which aren't enough to use the library.
这篇关于在Windows上安装C / C ++库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!