1. Download and install Cygwin
http://www.cygwin.com/
When installing, select the Components MINGW-GCC, Mingw-zlib, Pkg-config, Libiconv, which will be. NET program into the necessary compilation environment for the local program.
Cygwin the title bar in the Environment right-click Set character set to solve Chinese garbled characters
2. Start Cgywin and set environment variables:
1. Click on the Cygwin icon on the Start menu or on the desktop to launch and enter the Cygwin environment.
2. Enter the following command to set or modify the necessary environment variables:
Exportpkg_config_path=/cygdrive/d/progra~1/mono-3.2.3/lib/pkgconfig
Exportpath= $PATH:/cygdrive/d/progra~1/mono-3.2.3/mono/bin
Exportpath= $PATH:/usr/i686-pc-mingw32/bin
3. Execute the following command:
1. Switch to executable directory (program written in C #)
$ CD D:/monoworkspace/tcplistener/tcplistener/bin/debug
2, conversion and packaging, the. NET program and Class library package and get a Tcpclientdemo program source code
$ mkbundle-c-ohost.c-oo bundle.o--deps TcpListener.exe Newtonsoft.Json.dll
Host.c and BUNDLE.O files are generated under the executable program's directory
4. Start the installation program again
Installation
Gcc-core:c compiler
gcc-g++:c++ compiler
GDB:GNU Debugger
Make: GNU version of the "make" utility
Popt
Dos2unix
in http://linux.softpedia.com/progDownload/Dos2Unix-Download-5519.htm
Download hd2u-1.0.0.tgz , put in cygwin/tmp under
Execute the following command
TAR-ZXF hd2u-1.0.0.tgz
cdhd2u-1.0.0
./configure
5. compiling
Gcc-o winapp.exe-wall host.c ' pkg-config--cflags--libs Mono-2|dos2unix ' Bundle.o-lz-licon
Mono Authoring installation package keeps C # desktop applications out of NET Framework steps