Compiling with gcc (cygwin on windows)

前端 未结 5 2071
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-30 11:57

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 t

5条回答
  •  爱一瞬间的悲伤
    2020-12-30 12:29

    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'
    

    OR

    cygcheck ./a.exe
    

    or for windows in general, use something like this tool: Dependency Walker

提交回复
热议问题