I have downloaded the gtk all-in-one package for windows. I am compiling my file with -mms-bitfields but still i get the error,
Gtk-ERROR **: Incompatible build! The code using GTK+ thinks GtkBox is of different size than it actually is in this build of GTK+. On Windows, this probably means that you have compiled your code with gcc without the -mms-bitfields switch, or that you are using an unsupported compiler. aborting...
You should enable -mms-bitfields in your project's properties.
Depending on what IDE you use, it might be a bit different.
In NetBeans, right click on your project. Then go to Project Properties -> C++ Compiler. Expand Compilation Line and in Additional Options enter -mms-bitfields. Make sure that Configuration is set to All Configuration. Rebuild your project.
In Code::Blocks I think you should do, as follows: Right click on your project -> Build Options. Go to Compiler Settings -> Other Options and write -mms-bitfields. Make sure that you apply this change to the whole project (not just the debug or release). Rebuild your project.