使用MinGW编译一个SFML项目 [英] Using MinGW to compile a SFML project

查看:641
本文介绍了使用MinGW编译一个SFML项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我有一个使用SFML的C ++项目,我想能够使用MinGW从CMD编译它。我有它,所以我可以compile.cpp的,但是,我只需要知道我还要做什么,为了使它与SFML工作。我试着用CodeBlocks和MinGW编译它,它的工作正常,直到我尝试运行它,在这一点,它告诉我sfml-system.dll从我的电脑丢失。这是否意味着我安装不正确?我按照CodeBlocks安装下来的信,从我可以告诉...我把include \SFML在include \的MinGW,我把所有的* .a从lib \到\lib的MinGW。
谢谢您的帮助。

Okay, so I have a C++ project that uses SFML, and I want to be able to compile it from the CMD using MinGW. I have it so I can compile.cpp's, however, I just need to know what more I have to do in order for it to work with SFML. I tried compiling it with CodeBlocks and MinGW, and it works fine, until I try to run it, at which point it tells me that sfml-system.dll is missing from my computer. Does this mean I installed it incorrectly? I followed the CodeBlocks installation down to the letter, from what I could tell... I put the include\SFML in the include\ of MinGW, and I put all the *.a's from lib\ into the \lib of MinGW as well. Thank you for the help you can give!

推荐答案

好的,如果它构建良好, code> sfml-system.dll 在链接时,那么没有真正的问题。所有你需要做的是在目录中复制 sfml-system.dll (或者链接到它),其中构建的 .exe 文件是。这将使 .exe 找到所需的库。

Ok, so if it builds well and links with the sfml-system.dll at link time then there is no real problem. All you need to do is copy the sfml-system.dll (or make a link to it) in the directory, where the built .exe file is. That would make the .exe find the required library.

这篇关于使用MinGW编译一个SFML项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆