Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
400 views
in Technique[技术] by (71.8m points)

c# cywgwin mono mkbundle windows 7 - cannot compile file

I'm trying to follow the following post to build a c# app with mono embedded, using cygwin.

I am following the guide here: How to convert a simple .Net console project a into portable exe with Mono and mkbundle?

The error I am receiving is:

"gcc: the -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler."

I'm unsure how to fix this - can anyone advise?

I'm using: Windows 7 x64, Mono 2.4.3, cygwin 7.1 beta (for Windows 7 support).

Thanks,

Frank

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Have you tried updating to Mono 2.6.1? I successfully got a Windows Form application working using mkbundle on Win7 x64 using the following steps:

  1. Download Mono 2.6.1
  2. Downloaded cgywin 1.7.1
  3. Installed packages gcc-mingw, mingw-zlib and pkg-config for cgywin
  4. Started cgywin and edited .bashrc e.g. C:/progra~2/notepad++/notepad++ $HOME/.bashrc
  5. Added $HOME/.bashrc export PATH=$PATH:/cygdrive/c/progra~2/Mono-2.6.1/bin
  6. Added $HOME/.bashrc export PKG_CONFIG_PATH=/cygdrive/c/progra~2/Mono-2.6.1/lib/pkgconfig
  7. Quit & restarted cygwin
  8. Changed directory to .Net application
  9. Compile the solution using xbuild
  10. Change directory to bin folder e.g. binDebug
  11. mkbundle -o Setup SetupForm.exe --deps -z
  12. Copied native mono dlls to binDebug folder (mono.dll, libglib-2.0-0.dll, libgthread-2.0-0.dll, zlib.dll)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...