I want to use the Gnome GLib in a Windows environment using the free MinGW compiler to develop in C. The problem is, I have absolutely no idea how to compile this library. Would any of you please explain what tools are needed to accomplish this and what instructions need to be followed?
GLib is available pre-compiled for Windows and has been for ages: http://www.gtk.org/download/windows.php.
You need to use MSys, it is downloadable from MinGW site. Using MSys you will be able to build GLib: http://www.mingw.org/wiki/Bootstrapping_GLIB_with_MinGW
Related
Hi guys How is possible create a packages for windows with Gcc like this http://gnuwin32.sourceforge.net/packages.html anyone have tutorial? thanks
A lot of open source can be built on Windows using MinGW-w64 GCC (e.g. from https://winlibs.com/) and if needed MSYS2.
When using the MSYS2 the build process is almost the same as on Unix/Linux if the open source project in question uses build tools like ./configure or cmake.
If you would consider using already prebuilt packages check out the MSYS2 package manager pacman.
The library comes with instructions on how to compile it on Linux:
./autogen.sh
./configure
make
But I can't find any source on the Internet to help me compile this code directly on Windows, just as if I never had a Linux machine.
nDPI is hosted here: https://github.com/ntop/nDPI
You could set up a linux-like CLI using Cygwin (very useful tool) and cross compile to Windows. It's not a complicated process and there is a lot of documentation around the Internet. I recommend using the MinGW 32 cross compiler.
You can use NFStream which provide Windows support and use nDPI as a DPI engine.
You have to edit some lines of source code and add the files
ntop_win32.h and ntop_win32.c
Then you can compile nDPI with Visual Studio.
I want to use gcc ( and g++ ) under windows 7.
I download cygwin ( setup file: setup.exe )...
So, what is packages really needed?! It suggests to setup very many packages, but i think that for developing in C++ not all of these is really needed..
gcc4-g++ for Cygwin programs
mingw64-i686-gcc-g++ for 32-bit MinGW programs
mingw64-x86_64-gcc-g++ for 64-bit MinGW programs
Setup.exe will select their dependencies such as gcc-core or binutils for you.
You'll probably also want make, and don't forget to pick an editor. Other packages in my minimum install: cygutils, diffutils, util-linux, inetutils, openssh, mintty.
If you would like to use only gcc and g++, I'd receomend you MinGW Distro designed by Stephan T. Lavavej.
Here is a direct link: http://nuwen.net/mingw.html to the Distro's main page. It contains currently the most up to date gcc and boost (4.7.2 and 1.52.0 respectively in version 9.5). It also contains make, git and couple more of useful tools.
Installation is really simple, you need only to extract zip-archive.
So, if you need Cygwin only to use GCC, I'd recomment you this MinGW Distro instead of Cygwin.
Greetings,
Since "gcc -mno-cygwin" does not work anymore, I was looking for a way to get a MinGW-targeted GCC running within my Cygwin environment. (Running a MSYS environment is not an option at this point.)
The Cygwin installer offers a package "gcc-mingw", which installs, among others:
lib/gcc/i686-pc-mingw32/3.4.4/cc1.exe
lib/gcc/i686-pc-mingw32/3.4.4/collect2.exe
lib/gcc/i686-pc-mingw32/3.4.4/crtbegin.o
lib/gcc/i686-pc-mingw32/3.4.4/crtend.o
What is absent is the "gcc" frontend. So, how do I actually invoke this compiler? I hopefully don't have to go through "cc1" manually, have I?
I googled, but couldn't find anything relevant on the subject...
As you already found, you can use gcc-3 with -mno-cygwin. The other possibility is to install the 32-bit and/or 64-bit toolchains from the MinGW-w64 project, which have been packaged for Cygwin very recently and hence are available through setup.exe now. Don't be put off by the rather confusing executable names: i686-w64-mingw32-gcc is the 32-bit compiler and x86_64-w64-mingw32-gcc is the 64-bit one.
Further searches revealed that the MinGW-targeted cross-compiler is not ready yet, and that one has to either use GCC v3 with -mno-cygwin, or install a cross-compiler manually (see link above)...
After installing the MingW g++ package for Cygwin (mingw64-x86_64-gcc-g++), I also struggled to figure out how to invoke it.
Thanks to this wiki, I found out the command was x86_64-w64-mingw32-g++. Then I did alias g++='x86_64-w64-mingw32-g++' and g++ started working as expected.
Cygwin homepage says that "Individual packages like bash, gcc, less, etc. are released independently of the DLL.".
Here you can find how to install gcc under cygwin, so you should also select gcc package during install not only gcc-mingw.
I need to compile kannel for windows and I installed cygwin. It says I don't have compilers to compile with cygwin. How do I resolve this ? Is there any full-featured cygwin image available anywhere on the internet ?
Please help. SOS!
I'm following this tutorial to compile kannel with cygwin.
http://saurabhsachdeva.wordpress.com/2008/02/29/kannel-installation-on-windows/
It looks like Kannel is written in C, so you probably just need to install make, gcc, and so on; these aren't included in the base Cygwin install, so you need to re-run the installer and make sure you select those packages. See the Cygwin FAQ.
As kannel is built with C, you need a C compiler. In my case, I have Visual Studio 2010, which has a built in C compiler. Just Google for "C compiler"; you can get many Open Source ones for free.