User forums > General (but related to Code::Blocks)
Gtkmm
Priit:
Anyone using gtkmm ( http://www.gtkmm.org/ ) with code::blocks?
I downloaded a Developer (Full) Environment package here-> http://www.pcpm.ucl.ac.be/~gustin/win32_ports/ ...the first one.
But how i integrate it with CB. I added gtkmm lib and include directories to my project but it won't compile. Obviously i missed some drectories :).
Code i am trying to compile:
--- Code: ---#include <gtkmm.h>
int main(int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
Gtk::Window window;
Gtk::Main::run(window);
return 0;
}
--- End code ---
Error:
--- Code: ---Project : Console application
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\Priit\Desktop\
--------------------------------------------------------------------------------
Switching to target: default
mingw32-g++.exe -I..\..\..\Dev\gtkmm\include -IC:\Dev\MinGW\include -c main.cpp -o .objs\main.obj
main.cpp:1:19: gtkmm.h: No such file or directory
main.cpp: In function `int main(int, char**)':
main.cpp:5: error: `Gtk' has not been declared
main.cpp:5: error: `Main' undeclared (first use this function)
main.cpp:5: error: (Each undeclared identifier is reported only once for each function it appears in.)
main.cpp:5: error: expected `;' before "kit"
main.cpp:7: error: `Gtk' has not been declared
main.cpp:7: error: `Window' undeclared (first use this function)
main.cpp:7: error: expected `;' before "window"
main.cpp:9: error: `Gtk' has not been declared
main.cpp:9: error: `window' undeclared (first use this function)
main.cpp:9: error: `run' undeclared (first use this function)
Process terminated with status 1 (0 minutes, 0 seconds)
11 errors, 0 warnings
--- End code ---
Does anyone has cb template for gtkmm? :mrgreen:
grv575:
OK, here's a walkthrough. If you want to create a template and sumbit it then that would be great.
- Download the gtkmm on win32 Developer (Full) Environment at the link you gave
http://www.pcpm.ucl.ac.be/~gustin/win32_ports/gtkmm.html
This package is all that's needed to get started writing GTK+ apps on win32 in C++. The installer will download the necessary gtk+ development stuff. I installed both to the default paths (c:\GTK)
- Note that GTK+ on win32 informs that the flag
"-mms-bitfields"
should be passed as a compiler option.
see: http://www.gimp.org/win32/
- Create a new Win32 GUI Application (for now since there is no template) and choose "Do not create any files"
- Activate the project, create a new file, cut and paste the code you were trying to compile:
--- Code: ---#include <gtkmm.h>
int main(int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
Gtk::Window window;
Gtk::Main::run(window);
return 0;
}
--- End code ---
and save as test.cpp
- goto project->build options and then add the stuff seen in the following screen shots :D
Note that I used relative paths, so yours may differ somewhat, depending on where you created the project. After everything is as shown in the screens below, hit OK, and then compile (build). You should be able to click the run button and see a working
app.
takeshimiya:
A side note that doesn't contribute anything :P:
The GtkMM is the worst gui toolkit I ever saw.
The code & internal design seems good, but the implementation is the worst and slower, it's perhaps slower than Java's SWT.
So I wouldn't recommend it to anyone.
zieQ:
I agree with takeshimiya ;)
grv575:
Does this apply to gtk+ on win32 as well (with it's ugly static C funtions everywhere :P)? Or is it decent speed?
Navigation
[0] Message Index
[#] Next page
Go to full version