Thread: [Dev-C++] QUESTION ON ERROR LOG FROM A NEWBIE
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Peter K. <pw...@st...> - 2004-04-19 01:27:49
|
Dear All, I have launched into the steep learning curve of C++ by attempting to get GTKmm installed and running on Windows 98SE machine. Installation is straightforward (based on the excellent GTKmm Win 32 port site www.pcpm.ucl.ac.be/~gustin/win32_ports/ and the instructions in the docs) but in attempting my first program on Dev C++ I get the (linker?) error list (only partial) as noted below: Compiler: Default compiler Building Makefile: "C:\Programming\TrialGTKmm#1\Makefile.win" Executing make clean rm -f Trial1.o gtkmm g++.exe -c Trial1.cpp -o Trial1.o -I"C:/DEV-CPP/include/c++" -I"C:/DEV-CPP/include/c++/mingw32" -I"C:/DEV-CPP/include/c++/backward" -I"C:/DEV-CPP/include" -Ic:/dev-cpp/gtkmm/include/gtkmm-2.0 -Ic:/dev-cpp/gtkmm/lib/gtkmm-2.0/include -Ic:/dev-cpp/gtkmm/lib/sigc++-1.2/include -Ic:/dev-cpp/gtkmm/include/sigc++-1.2 -Ic:/dev-cpp/include/gtk-2.0 -Ic:/dev-cpp/include/glib-2.0 -Ic:/dev-cpp/lib/glib-2.0/include -Ic:/dev-cpp/lib/gtk-2.0/include -Ic:/dev-cpp/include/pango-1.0 -Ic:/dev-cpp/include/atk-1.0 -Lc:/dev-cpp/gtkmm/lib -Lc:/dev-cpp/lib In file included from C:/DEV-CPP/include/gdk/gdk.h:33, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/types.h:28, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:27, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, from Trial1.cpp:1: C:/DEV-CPP/include/gdk/gdkdnd.h:99:8: warning: extra tokens at end of #endif directive In file included from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/drawable.h:36, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/gc.h:30, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:29, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, from Trial1.cpp:1: c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: `GdkSpan' was not declared in this scope c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: `spans' was not declared in this scope c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: parse error before `,' token In file included from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/bitmap.h:27, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/window.h:28, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:31, from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, from Trial1.cpp:1: c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:64: ISO C++ forbids declaration of `GdkPixmapObjectClass' with no type c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:64: parse error before `;' token c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:113: type specifier omitted for parameter `GdkNativeWindow' c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:113: parse error before `)' token Sorry for this, but can somebody point me in the right direction please??? Peter Key |
|
From: Per W. <pw...@ia...> - 2004-04-19 07:45:15
|
If you read your linkin line, you'l notice that it contains a lot of -Ixx - include path for header files and not needed during link. It also contains one -Lxx - library path, i.e. where the linker should pick up any needed libraries. However, there is not a single: -lxx - i.e. a specification _which_ library should be used. If you open your project options, select the 'Parameters' tab and look at the Linker options, you should specify which libraries the project needs. Most probably, you should specify something like -lgtk or whatever the gtk libraries might be named. You don't have to specify the starting lib and the ending .a. /Per W On Mon, 19 Apr 2004, Peter Key wrote: > Dear All, > > > > I have launched into the steep learning curve of C++ by attempting to > get GTKmm installed and running on Windows 98SE machine. Installation is > straightforward (based on the excellent GTKmm Win 32 port site > www.pcpm.ucl.ac.be/~gustin/win32_ports/ and the instructions in the > docs) but in attempting my first program on Dev C++ I get the (linker?) > error list (only partial) as noted below: > > > > Compiler: Default compiler > > Building Makefile: "C:\Programming\TrialGTKmm#1\Makefile.win" > > Executing make clean > > rm -f Trial1.o gtkmm > > g++.exe -c Trial1.cpp -o Trial1.o -I"C:/DEV-CPP/include/c++" > -I"C:/DEV-CPP/include/c++/mingw32" -I"C:/DEV-CPP/include/c++/backward" > -I"C:/DEV-CPP/include" -Ic:/dev-cpp/gtkmm/include/gtkmm-2.0 > -Ic:/dev-cpp/gtkmm/lib/gtkmm-2.0/include > -Ic:/dev-cpp/gtkmm/lib/sigc++-1.2/include > -Ic:/dev-cpp/gtkmm/include/sigc++-1.2 -Ic:/dev-cpp/include/gtk-2.0 > -Ic:/dev-cpp/include/glib-2.0 -Ic:/dev-cpp/lib/glib-2.0/include > -Ic:/dev-cpp/lib/gtk-2.0/include -Ic:/dev-cpp/include/pango-1.0 > -Ic:/dev-cpp/include/atk-1.0 -Lc:/dev-cpp/gtkmm/lib -Lc:/dev-cpp/lib > > In file included from C:/DEV-CPP/include/gdk/gdk.h:33, > > from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/types.h:28, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:27, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, > > from Trial1.cpp:1: > > C:/DEV-CPP/include/gdk/gdkdnd.h:99:8: warning: extra tokens at end of > #endif directive > > In file included from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/drawable.h:36, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/gc.h:30, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:29, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, > > from Trial1.cpp:1: > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: `GdkSpan' was not > > > declared in this scope > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: `spans' was not > declared > > in this scope > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: parse error > before `,' > > token > > In file included from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/bitmap.h:27, > > from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/window.h:28, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:31, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, > > from Trial1.cpp:1: > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:64: ISO C++ forbids > > declaration of `GdkPixmapObjectClass' with no type > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:64: parse error before > `;' > > token > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:113: type specifier > omitted > > for parameter `GdkNativeWindow' > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:113: parse error > before `)' > > token > > > > Sorry for this, but can somebody point me in the right direction > please??? > > > > Peter Key > > > > > > |
|
From: Peter K. <pw...@st...> - 2004-04-20 06:00:54
|
Dear Per, Thank you for taking the time to respond. I appreciate it. I actually have included a whole bunch of -lxxx commands in the linker options already. I am not sure why it is not showing up in the compiler output - perhaps because it does not get to linking stage?? I chased down the first warning message and it appears to relate to (in my opinion incorrect) usage of text immediately after an #endif directive, but I would have thought this code had been checked and correct??. The 2nd error message relates to a member defined in gdktypes.h, which is located in \dev-cpp\include\gtk-2.0\gdk directory. I cannot help thinking I need to have PATH statements in my Autoexec.bat file?? I am also quite confused about when to use "\" and when to use"/" for directory separator. The former is Windows and the latter Linux(?). The compiler output actually uses both! Thanks in advance for your help...... Peter Key -----Original Message----- From: Per Westermark [mailto:pw...@ia...] Sent: Monday, 19 April 2004 5:45 PM To: Peter Key Cc: dev...@li... Subject: Re: [Dev-C++] QUESTION ON ERROR LOG FROM A NEWBIE If you read your linkin line, you'l notice that it contains a lot of -Ixx - include path for header files and not needed during link. It also contains one -Lxx - library path, i.e. where the linker should pick up any needed libraries. However, there is not a single: -lxx - i.e. a specification _which_ library should be used. If you open your project options, select the 'Parameters' tab and look at the Linker options, you should specify which libraries the project needs. Most probably, you should specify something like -lgtk or whatever the gtk libraries might be named. You don't have to specify the starting lib and the ending .a. /Per W On Mon, 19 Apr 2004, Peter Key wrote: > Dear All, > > > > I have launched into the steep learning curve of C++ by attempting to > get GTKmm installed and running on Windows 98SE machine. Installation is > straightforward (based on the excellent GTKmm Win 32 port site > www.pcpm.ucl.ac.be/~gustin/win32_ports/ and the instructions in the > docs) but in attempting my first program on Dev C++ I get the (linker?) > error list (only partial) as noted below: > > > > Compiler: Default compiler > > Building Makefile: "C:\Programming\TrialGTKmm#1\Makefile.win" > > Executing make clean > > rm -f Trial1.o gtkmm > > g++.exe -c Trial1.cpp -o Trial1.o -I"C:/DEV-CPP/include/c++" > -I"C:/DEV-CPP/include/c++/mingw32" -I"C:/DEV-CPP/include/c++/backward" > -I"C:/DEV-CPP/include" -Ic:/dev-cpp/gtkmm/include/gtkmm-2.0 > -Ic:/dev-cpp/gtkmm/lib/gtkmm-2.0/include > -Ic:/dev-cpp/gtkmm/lib/sigc++-1.2/include > -Ic:/dev-cpp/gtkmm/include/sigc++-1.2 -Ic:/dev-cpp/include/gtk-2.0 > -Ic:/dev-cpp/include/glib-2.0 -Ic:/dev-cpp/lib/glib-2.0/include > -Ic:/dev-cpp/lib/gtk-2.0/include -Ic:/dev-cpp/include/pango-1.0 > -Ic:/dev-cpp/include/atk-1.0 -Lc:/dev-cpp/gtkmm/lib -Lc:/dev-cpp/lib > > In file included from C:/DEV-CPP/include/gdk/gdk.h:33, > > from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/types.h:28, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:27, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, > > from Trial1.cpp:1: > > C:/DEV-CPP/include/gdk/gdkdnd.h:99:8: warning: extra tokens at end of > #endif directive > > In file included from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/drawable.h:36, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/gc.h:30, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:29, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, > > from Trial1.cpp:1: > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: `GdkSpan' was not > > > declared in this scope > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: `spans' was not > declared > > in this scope > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/region.h:189: parse error > before `,' > > token > > In file included from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/bitmap.h:27, > > from > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/window.h:28, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm.h:31, > > from c:/dev-cpp/gtkmm/include/gtkmm-2.0/gtkmm.h:30, > > from Trial1.cpp:1: > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:64: ISO C++ forbids > > declaration of `GdkPixmapObjectClass' with no type > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:64: parse error before > `;' > > token > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:113: type specifier > omitted > > for parameter `GdkNativeWindow' > > c:/dev-cpp/gtkmm/include/gtkmm-2.0/gdkmm/pixmap.h:113: parse error > before `)' > > token > > > > Sorry for this, but can somebody point me in the right direction > please??? > > > > Peter Key > > > > > > __________ NOD32 1.724 (20040419) Information __________ This message was checked by NOD32 antivirus system. http://www.nod32.com |
|
From: Denis K. <di...@ya...> - 2004-04-20 07:28:33
|
Monday, April 19, 2004, 8:27:37 AM, you wrote: PK> Dear All, PK> I have launched into the steep learning curve of C++ by attempting to PK> get GTKmm installed and running on Windows 98SE machine. Installation is PK> straightforward (based on the excellent GTKmm Win 32 port site PK> www.pcpm.ucl.ac.be/~gustin/win32_ports/ and the instructions in the PK> docs) but in attempting my first program on Dev C++ I get the (linker?) PK> error list (only partial) as noted below: // skiped It is not a linker error. It looks like some headers are not correct, possibly you have not matching versions of gtk+ and gtkmm. PK> In file included from C:/DEV-CPP/include/gdk/gdk.h:33 This thing looks very strange : include/gdk/gdk.h. As far as I know there must be something like that: include/gtk-2.0/gdk/gdk.h Please, post content of your makefile and output string of pkg-config.exe --libs --cflags gtkmm-2.0 -- Best regards, Denis |
|
From: Peter K. <pw...@st...> - 2004-04-21 23:43:32
|
Denis, Thanks for your input. Result of pkg-config --libs --cflags gtkmm-2.0 is: -Ic:/dev-cpp/gtkmm/include/gtkmm-2.0 -Ic:/dev-cpp/gtkmm/lib/gtkmm-2.0/include -Ic:/dev-cpp/gtkmm/lib/sigc++-1.2/include -Ic:/dev-cpp/gtkmm/include/sigc++-1.2 -Ic:/dev-cpp/include/gtk-2.0 -Ic:/dev-cpp/include/glib-2.0 -Ic:/dev-cpp/lib/glib-2.0/include -Ic:/dev-cpp/lib/include/pango-1.0 -Ic:/dev-cpp/lib/include/atk-1.0 -Lc:/dev-cpp/gtkmm/lib -Lc:/dev-cpp/lib -lgtkmm-2.0 -lgdkmm-2.0 -latkmm-1.0 -lgtk-win32-2.0 -lpangomm-1.0 -lglibmm-2.0 -lsigc-1.2 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv Makefile.win is: # Project: Project1 # Makefile created by Dev-C++ 4.9.8.7 CPP = g++.exe CC = gcc.exe WINDRES = windres.exe RES = OBJ = Trial1.o $(RES) LINKOBJ = Trial1.o $(RES) LIBS = -L"C:/DEV-CPP/lib" -lgtkmm-2.0 -lgdkmm-2.0 -latkmm-1.0 -lgtk-win32-2.0 -lpangomm-1.0 -lglibmm-2.0 -lsigc-1.2 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv INCS = -I"C:/DEV-CPP/include" CXXINCS = -I"C:/DEV-CPP/include/c++" -I"C:/DEV-CPP/include/c++/mingw32" -I"C:/DEV-CPP/include/c++/backward" -I"C:/DEV-CPP/include" BIN = gtkmm#1.exe CXXFLAGS = $(CXXINCS)-Ic:/dev-cpp/gtkmm/include/gtkmm-2.0 -Ic:/dev-cpp/gtkmm/lib/gtkmm-2.0/include -Ic:/dev-cpp/gtkmm/lib/sigc++-1.2/include -Ic:/dev-cpp/gtkmm/include/sigc++-1.2 -Ic:/dev-cpp/include/gtk-2.0 -Ic:/dev-cpp/include/glib-2.0 -Ic:/dev-cpp/lib/glib-2.0/include -Ic:/dev-cpp/lib/gtk-2.0/include -Ic:/dev-cpp/include/pango-1.0 -Ic:/dev-cpp/include/atk-1.0 -Lc:/dev-cpp/gtkmm/lib -Lc:/dev-cpp/lib CFLAGS = $(INCS) .PHONY: all all-before all-after clean clean-custom all: all-before gtkmm#1.exe all-after clean: clean-custom rm -f $(OBJ) $(BIN) $(BIN): $(OBJ) $(CPP) $(LINKOBJ) -o "gtkmm#1.exe" $(LIBS) Trial1.o: Trial1.cpp $(CPP) -c Trial1.cpp -o Trial1.o $(CXXFLAGS) Thanks in advance for your help! Peter -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Denis Korzunov Sent: Tuesday, 20 April 2004 5:27 PM To: Peter Key Cc: dev...@li... Subject: Re: [Dev-C++] QUESTION ON ERROR LOG FROM A NEWBIE Monday, April 19, 2004, 8:27:37 AM, you wrote: PK> Dear All, PK> I have launched into the steep learning curve of C++ by attempting to PK> get GTKmm installed and running on Windows 98SE machine. Installation is PK> straightforward (based on the excellent GTKmm Win 32 port site PK> www.pcpm.ucl.ac.be/~gustin/win32_ports/ and the instructions in the PK> docs) but in attempting my first program on Dev C++ I get the (linker?) PK> error list (only partial) as noted below: // skiped It is not a linker error. It looks like some headers are not correct, possibly you have not matching versions of gtk+ and gtkmm. PK> In file included from C:/DEV-CPP/include/gdk/gdk.h:33 This thing looks very strange : include/gdk/gdk.h. As far as I know there must be something like that: include/gtk-2.0/gdk/gdk.h Please, post content of your makefile and output string of pkg-config.exe --libs --cflags gtkmm-2.0 -- Best regards, Denis ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users __________ NOD32 1.724 (20040419) Information __________ This message was checked by NOD32 antivirus system. http://www.nod32.com |
|
From: Denis K. <di...@ya...> - 2004-04-23 08:55:51
|
Hi, Peter. I looked through your makefile and found only one mistake: These options -Lc:/dev-cpp/gtkmm/lib -Lc:/dev-cpp/lib must be LIBS's parameters (i.e LIBS = -L"c:/dev-cpp/lib" -Lc:/dev-cpp/gtkmm/lib -lgtkmm-2.0 ...). It's not a CXXFLAGS. But the main problem is that you have Gtk+ 1.3 (or less) installed. Some heaaders from gtkmm-2.0 contains such include directives: #include <gdk/gdk.h> or #include <gtk/gtk.h> and so on. If you have directory c:/devcpp/include/gdk then #include <gdk/gdk.h> means that it is c:/devcpp/include/gdk/gdk.h file, but it must be c:/dev-cpp/include/gtk-2.0/gdk/gdk.h file! So it's simple incompatibility version error :-) . If you really need gtk+ 1.3 you must reinstall it into another directory (i.e. dev-cpp/include/gtk-1.3 and dev-cpp/lib/gtk-1.3 ). Good luck! -- Best regards, Denis |