views:

418

answers:

2

Hi,

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

I am following the guide here: http://stackoverflow.com/questions/1321207/how-to-convert-a-simple-net-console-project-a-into-portable-exe-with-mono-and-mk

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

A: 

I used a VPC running XP, cygwin 1.5 and all AOK

frank
+4  A: 

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. bin\Debug
  11. mkbundle -o Setup SetupForm.exe --deps -z
  12. Copied native mono dlls to bin\Debug folder (mono.dll, libglib-2.0-0.dll, libgthread-2.0-0.dll, zlib.dll)
Grant Archibald
It turns out I had 2 issues. 1st was I'd downloaded the incorrect gcc cygwin package (I had originanally downloaded all gcc packages - this time I removed them all, and just installed the mingw version). 2nd issue was my Windows "PATH" variable was set incorrectly: I had specified "progra~1", when it should have been "progra~2" - forgot on windows x64 about the 2 'program files' directories... Many thanks!
frank