编译gcc(cygwin在windows上) [英] Compiling with gcc (cygwin on windows)
问题描述
我有cygwin在windows上通过我运行gcc。但在创建.exe文件后,如果我运行他们没有cygwin的其他电脑,它说cygwin1.dll没有找到。
I have cygwin on windows through which I run gcc. But after creating .exe files, if I run them on other computers which dont have cygwin, it says cygwin1.dll not found. Is there a way to compile them so that they run on any system?
推荐答案
在您的情况下,尝试复制 cygwin1.dll (但它也可以依赖于其他DLL)(当然你必须遵守Cygwin的关于分发cygwin1.dll的许可)
在cygwin中,您可以随时使用以下方法检查所需的模块:
In your case, try to copy cygwin1.dll as well (but it could depend on other DLLs as well) (of course you must comply with Cygwin's license with regards to distributing cygwin1.dll)
In cygwin, you can always check the needed modules using:
objdump -p a.exe | grep 'DLL Name'
或
cygcheck ./a.exe
使用类似此工具的东西:依赖者步行者
or for windows in general, use something like this tool: Dependency Walker
这篇关于编译gcc(cygwin在windows上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!