I am new to DEVCPP and GTK. I try to install GTK but it doesn't seem to allow me to compile and I am quite confused.
I don't really understand the linker thing either ? can someone explain to me in detail how the whole thing work ?
cheers guys
Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the thread titled "Please Read Before Posting a Question",
the one that you posted directly over the top of, without
reading - there is a section on the compile log, including
headers, and linking libraries that will help you understand
the mechanics of libraries and linking.
If you are still having a problem, please post your Basic 3,
they are covered in that same thread.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Alright thanks, it helped me to understand how the whole linking and headers stuff. however, I am still not quite crystal clear on it yet... For example, I am trying to run the "hello world" of GTK:
include <gtk/gtk.h>
int main( int argc,
char argv[] )
{
GtkWidget window;
So, for this I downloaded and install the GTK librairies (from http://gimp-win.sourceforge.net/stable.html)
but I don't know if these are correct or not because the file gtk.h is actually located in C:\Dev-Cpp\include\gtk-2.0\gtk\
Not suprisingly, the compilation does not work and give this:
Compiler: Default compiler
Executing gcc.exe...
gcc.exe "C:\TEST\hello.c" -o "C:\TEST\hello.exe" -fexpensive-optimizations -O3 -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:\TEST\hello.c:1:21: gtk/gtk.h: No such file or directory
C:\TEST\hello.c: In function main':
C:\TEST\hello.c:6: error:GtkWidget' undeclared (first use in this function)
C:\TEST\hello.c:6: error: (Each undeclared identifier is reported only once
C:\TEST\hello.c:6: error: for each function it appears in.)
C:\TEST\hello.c:6: error: window' undeclared (first use in this function)
C:\TEST\hello.c:10: error:GTK_WINDOW_TOPLEVEL' undeclared (first use in this function)
Execution terminated
So maybe, I have installed the wrong package...?? if so, which one shall I put ?
I have not put anything in the linker option because I don't know what to put. GTK needs other dependencies like pango, ATK..etc...which came with package dut I don't know how this is all linked together
thanks for your help
Dav
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All,
I am new to DEVCPP and GTK. I try to install GTK but it doesn't seem to allow me to compile and I am quite confused.
I don't really understand the linker thing either ? can someone explain to me in detail how the whole thing work ?
cheers guys
Dave
In the thread titled "Please Read Before Posting a Question",
the one that you posted directly over the top of, without
reading - there is a section on the compile log, including
headers, and linking libraries that will help you understand
the mechanics of libraries and linking.
If you are still having a problem, please post your Basic 3,
they are covered in that same thread.
Wayne
Alright thanks, it helped me to understand how the whole linking and headers stuff. however, I am still not quite crystal clear on it yet... For example, I am trying to run the "hello world" of GTK:
include <gtk/gtk.h>
int main( int argc,
char argv[] )
{
GtkWidget window;
}
So, for this I downloaded and install the GTK librairies (from http://gimp-win.sourceforge.net/stable.html)
but I don't know if these are correct or not because the file gtk.h is actually located in C:\Dev-Cpp\include\gtk-2.0\gtk\
Not suprisingly, the compilation does not work and give this:
Compiler: Default compiler
Executing gcc.exe...
gcc.exe "C:\TEST\hello.c" -o "C:\TEST\hello.exe" -fexpensive-optimizations -O3 -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:\TEST\hello.c:1:21: gtk/gtk.h: No such file or directory
C:\TEST\hello.c: In function
main': C:\TEST\hello.c:6: error:GtkWidget' undeclared (first use in this function)C:\TEST\hello.c:6: error: (Each undeclared identifier is reported only once
C:\TEST\hello.c:6: error: for each function it appears in.)
C:\TEST\hello.c:6: error:
window' undeclared (first use in this function) C:\TEST\hello.c:10: error:GTK_WINDOW_TOPLEVEL' undeclared (first use in this function)Execution terminated
So maybe, I have installed the wrong package...?? if so, which one shall I put ?
I have not put anything in the linker option because I don't know what to put. GTK needs other dependencies like pango, ATK..etc...which came with package dut I don't know how this is all linked together
thanks for your help
Dav