Thread: FW: [Dev-C++] Problems with MySQL (also with GTK)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: J M. <jm...@we...> - 2002-04-30 23:02:07
|
Hi All, I've got a similar problem with GTK. What does 'add ... to your project' mean. I thought all I had to do was make a reference to the directory that contained the *.a files in the Tools: Compiler Options: Directories: Libraries dialog. Although I've got lots of references in the Libraries box the compiler still doesn't seem to be finding the libraries for GTK. I'm using Dev-C++ 4.9.2.0 (beta 5) on a Windows 2000 box. These are the errors I'm getting: Line Unit Message 10 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to 'gtk_init_abi_check' 12 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to 'gtk_window_new' 13 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to 'gtk_widget_show' 15 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to 'gtk_main' John M -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of co...@in... Sent: Tuesday, April 30, 2002 22:54 To: dev...@li... Subject: Re: [Dev-C++] Problems with MySQL > Might it be a fault of mysql.h file? Or, which liblaries have I use? You must add libmysql.a to your project. You can find it at: http://www.johnydog.cz/projects.php Segreterie VIP: attori, comici, personaggi TV! Voci famose rispondono per te! Scoprile qui http://genie.omitech.it/voicemail/ _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Peter K. <pw...@st...> - 2002-05-01 22:51:44
|
I have experienced similar problems and am now confused (which is not difficult!). As I understand it, if you include the relevant header (*.h) files in your code and then include the directory which contains the corresponding *.a file (or lib file) in your libraries search path, then the linker will search libraries on that path to resolve the reference. To state it clearly, you are saying I have to link with that particular library, rather than just include the search path? -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Andres Rand Sent: 01 May 2002 20:27 To: Dev-C++ User Mailing List Subject: RE: FW: [Dev-C++] Problems with MySQL (also with GTK) GCC does not know by it'self, what .a file contains required code. So you must specify those libs by yourself. Only reference to dir containing libs is not good enough. For example: if you compile standard c++ code (iostream etc.) it woulnt compile without -lstdc++ lib. (or atleast I have experienced so) Andres. >Hi All, > >I've got a similar problem with GTK. > >What does 'add ... to your project' mean. > >I thought all I had to do was make a reference >to the directory that contained the *.a files in the >Tools: Compiler Options: Directories: Libraries dialog. > >Although I've got lots of references in the Libraries box the >compiler still doesn't seem to be finding the libraries for GTK. > >I'm using Dev-C++ 4.9.2.0 (beta 5) on a Windows 2000 box. > >These are the errors I'm getting: >Line Unit Message >10 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to >'gtk_init_abi_check' >12 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to >'gtk_window_new' >13 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to >'gtk_widget_show' >15 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to >'gtk_main' > >John M > |
|
From: Hongli L. <h....@ch...> - 2002-04-30 23:57:47
|
J Miller wrote: >Hi All, > >I've got a similar problem with GTK. > >What does 'add ... to your project' mean. > >I thought all I had to do was make a reference >to the directory that contained the *.a files in the >Tools: Compiler Options: Directories: Libraries dialog. > >Although I've got lots of references in the Libraries box the >compiler still doesn't seem to be finding the libraries for GTK. > >I'm using Dev-C++ 4.9.2.0 (beta 5) on a Windows 2000 box. > >These are the errors I'm getting: >Line Unit Message >10 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to >'gtk_init_abi_check' >12 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to >'gtk_window_new' >13 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to >'gtk_widget_show' >15 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to >'gtk_main' > >John M > >-----Original Message----- >From: dev...@li... >[mailto:dev...@li...]On Behalf Of >co...@in... >Sent: Tuesday, April 30, 2002 22:54 >To: dev...@li... >Subject: Re: [Dev-C++] Problems with MySQL > > > > >> Might it be a fault of mysql.h file? Or, which liblaries have I >> >> >use? > >You must add libmysql.a to your project. You can find it at: >http://www.johnydog.cz/projects.php > > > You will have to link to the GTK+ libraries. Add these to your Linker options: -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv -limm32 -lshell32 -lole32 -luuid -lgdi32 -lm The next version of my GTK+ package will include a template that does that automatically for you. |
|
From: Andres R. <lo...@ho...> - 2002-05-01 10:26:47
|
GCC does not know by it'self, what .a file contains required code. So you must specify those libs by yourself. Only reference to dir containing libs is not good enough. For example: if you compile standard c++ code (iostream etc.) it woulnt compile without -lstdc++ lib. (or atleast I have experienced so) Andres. >Hi All, > >I've got a similar problem with GTK. > >What does 'add ... to your project' mean. > >I thought all I had to do was make a reference >to the directory that contained the *.a files in the >Tools: Compiler Options: Directories: Libraries dialog. > >Although I've got lots of references in the Libraries box the >compiler still doesn't seem to be finding the libraries for GTK. > >I'm using Dev-C++ 4.9.2.0 (beta 5) on a Windows 2000 box. > >These are the errors I'm getting: >Line Unit Message >10 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to >'gtk_init_abi_check' >12 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to >'gtk_window_new' >13 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to >'gtk_widget_show' >15 //F/Dev-C++/Projects/GTK/main.cpp undefined reference to >'gtk_main' > >John M > |