Re: [gtkmm] Compiling my first gtkmm program - HELP!!
- From: Maya <EscalanteCanada netscape net>
- To: murrayc murrayc com
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Compiling my first gtkmm program - HELP!!
- Date: Mon, 26 Apr 2004 15:44:47 -0400
First of all, thanks for the help, I am apologize for the HTML format
and yes, I'll reply to all.
Below is the error.txt report, please let me know if you need any more
information.
Thanks.
~~~~~~~~~|
Makefile |
~~~~~~~~~|
# GTKmm Make file
# Compiler name
CPP=g++
#Libraries to be included
LDLIBS=`pkg-config gtkmm-2.0 --libs`
#Flagas
CFLAGS= -Wall -g `pkg-config gtkmm-2.0 --cflags`
#Objects
OBJS = main.o wimm.o
#Executable
EXEC = wimm.exe
$(EXEC): $(OBJS)
$(CPP) $(OBJS) $(LDLIBS) -o $(EXEC)
main.o: main.cpp
$(CPP) $(CFLAGS) -c main.cpp
wimm.o: wimm.hpp
$(CPP) $(CFLAGS) -c wimm.cpp
clean:
rm -f $(OBJS)
rm -f $(EXEC)
PHONY: clean
~~~~~~~~~|
main.cpp |
~~~~~~~~~|
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gtkmm/main.h>
#include "wimm.hpp"
int main (int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
jme::Wimm wimm;
//Shows the window and returns when it is closed.
Gtk::Main::run(wimm);
return 0;
}
~~~~~~~~~|
wimm.hpp |
~~~~~~~~~|
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gtkmm/main.h>
#include "wimm.hpp"
int main (int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
jme::Wimm wimm;
//Shows the window and returns when it is closed.
Gtk::Main::run(wimm);
return 0;
}
~~~~~~~~~|
wimm.hpp |
~~~~~~~~~|
#ifndef WIMM_H
#define WIMM_H
#include <gtkmm/button.h>
#include <gtkmm/window.h>
namespace jme{
class Wimm : virtual public Gtk::Window {
public:
Wimm();
virtual ~Wimm();
protected:
//Member widgets:
Gtk::Button m_button;
}; //Wimm
} //Namespace
#endif
wimm.cpp
~~~~~~~~
#ifndef WIMM_H
#include "wimm.hpp"
#endif
jme::Wimm::Wimm()
// creates a new button with the label "Hello World".
: m_button("Hello World") {
// Sets the border width of the window.
set_border_width(10);
// This packs the button into the Window (a container).
add(m_button);
// The final step is to display this newly created widget...
m_button.show();
}
jme::Wimm::~Wimm(){}
~~~~~~|
Error |
~~~~~~|
wimm.o(.rdata$_ZTVN3jme4WimmE+0x2d8): In function `_ZN3jme4WimmD1Ev':
/home/admin/dev/lib/jme/wimm/wimm.cpp:22: undefined reference to
`virtual thunk [v:0,-28] to Gtk::Object::destroy_notify_()'
wimm.o(.rdata$_ZTCN3jme4WimmE4_N3Gtk6WindowE+0x2bc):/home/admin/dev/lib/jme/wimm/wimm.cpp:22:
undefined reference to `virtual thunk [v:0,-28] to
Gtk::Object::destroy_notify_()'
wimm.o(.rdata$_ZTCN3jme4WimmE4_N3Gtk3BinE+0x168): In function
`_ZN3jme4WimmD2Ev':
/home/admin/dev/lib/jme/wimm/wimm.cpp:22: undefined reference to
`virtual thunk [v:0,-28] to Gtk::Object::destroy_notify_()'
wimm.o(.rdata$_ZTCN3jme4WimmE4_N3Gtk9ContainerE+0x168):/home/admin/dev/lib/jme/wimm/wimm.cpp:22:
undefined reference to `virtual thunk [v:0,-28] to
Gtk::Object::destroy_notify_()'
wimm.o(.rdata$_ZTCN3jme4WimmE4_N3Gtk6WidgetE+0x140):/home/admin/dev/lib/jme/wimm/wimm.cpp:22:
undefined reference to `virtual thunk [v:0,-28] to
Gtk::Object::destroy_notify_()'
wimm.o(.rdata$_ZTCN3jme4WimmE4_N3Gtk6ObjectE+0x50):/home/admin/dev/lib/jme/wimm/wimm.cpp:22:
more undefined references to `virtual thunk [v:0,-28] to
Gtk::Object::destroy_notify_()' follow
Info: resolving vtable for SigC::ObjectBaseby linking to
__imp___ZTVN4SigC10ObjectBaseE (auto-import)
collect2: ld returned 1 exit status
make: *** [wimm.exe] Error 1
~~~|
OS |
~~~|
WIN98/CYGWIN LATEST VERSION
~~~~~~~~~|
COMPILER |
~~~~~~~~~|
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
Configured with: /GCC/gcc-3.3.1-3/configure --with-gcc --with-gnu-ld
--with-gnu-as --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc
--libdir=/usr/lib --libexecdir=/usr/sbin --mandir=/usr/share/man
--infodir=/usr/share/info
--enable-languages=c,ada,c++,f77,pascal,java,objc --enable-libgcj
--enable-threads=posix --with-system-zlib --enable-nls
--without-included-gettext --enable-interpreter --enable-sjlj-exceptions
--disable-version-specific-runtime-libs --enable-shared
--disable-win32-registry --enable-java-gc=boehm
--disable-hash-synchronization --verbose --target=i686-pc-cygwin
--host=i686-pc-cygwin --build=i686-pc-cygwin
Thread model: posix
gcc version 3.3.1 (cygming special)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]