- 论坛徽章:
- 0
|
大家好,我在http://www.gtkmm.org/docs/gtkmm- ... drawingarea/simple/
尝试编译教程给出的demo,结果我这里Make输出的是,我已经详细对了代码,和教程给的一样,除了我自己修改了make -o为drawline之外,其他并无任何差别。已经google了好久,没找到解决方法,请大家帮我看看。
- g++ main.cc -o drawline `pkg-config gtkmm-2.4 --cflags --libs`
- /tmp/ccv6G64L.o: In function `main':
- main.cc:(.text+0xa8): undefined reference to `MyArea::MyArea()'
- main.cc:(.text+0xe2): undefined reference to `MyArea::~MyArea()'
- main.cc:(.text+0xfb): undefined reference to `MyArea::~MyArea()'
- collect2: ld returned 1 exit status
- make: *** [drawline] Error 1
复制代码
附上我的环境:
g++ -v的输出:
- Using built-in specs.
- Target: i486-linux-gnu
- Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
- Thread model: posix
- gcc version 4.3.2 (Debian 4.3.2-1)
复制代码
make -v的输出:
- make -v
- GNU Make 3.81
- Copyright (C) 2006 Free Software Foundation, Inc.
- This is free software; see the source for copying conditions.
- There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
- PARTICULAR PURPOSE.
- This program built for i486-pc-linux-gnu
复制代码
gtkmm库装的是libgtkmm-2.4版本的
系统是debian lenny 更新到最新状态。
请大家帮帮我,谢谢。
[ 本帖最后由 ganquanvip 于 2008-10-28 10:48 编辑 ] |
|