当前位置: 技术问答>linux和unix
用eclipse+cdt开发gtk程序,链接时报错...无奈了
来源: 互联网 发布时间:2016-02-26
本文导语: **** Build of configuration Debug for project gtk_test **** make all Building file: ../c.c Invoking: GCC C Compiler gcc -O0 `pkg-config --cflags --libs gtk+-2.0` -MMD -MP -MF"c.d" -MT"c.d" -o"c.o" "../c.c" Finished building: ../c.c Building target:...
**** Build of configuration Debug for project gtk_test ****
make all
Building file: ../c.c
Invoking: GCC C Compiler
gcc -O0 `pkg-config --cflags --libs gtk+-2.0` -MMD -MP -MF"c.d" -MT"c.d" -o"c.o" "../c.c"
Finished building: ../c.c
Building target: gtk_test
Invoking: GCC C Linker
gcc -nostartfiles `pkg-config --libs gtk+-2.0` -o"gtk_test" ./c.o
./c.o: In function `_edata':
(*ABS*+0x8049820): multiple definition of `__bss_start'
./c.o: In function `_end':
(*ABS*+0x8049824): multiple definition of `_end'
./c.o: In function `_edata':
(*ABS*+0x8049820): multiple definition of `_edata'
collect2: ld returned 1 exit status
make: *** [gtk_test] Error 1
make all
Building file: ../c.c
Invoking: GCC C Compiler
gcc -O0 `pkg-config --cflags --libs gtk+-2.0` -MMD -MP -MF"c.d" -MT"c.d" -o"c.o" "../c.c"
Finished building: ../c.c
Building target: gtk_test
Invoking: GCC C Linker
gcc -nostartfiles `pkg-config --libs gtk+-2.0` -o"gtk_test" ./c.o
./c.o: In function `_edata':
(*ABS*+0x8049820): multiple definition of `__bss_start'
./c.o: In function `_end':
(*ABS*+0x8049824): multiple definition of `_end'
./c.o: In function `_edata':
(*ABS*+0x8049820): multiple definition of `_edata'
collect2: ld returned 1 exit status
make: *** [gtk_test] Error 1
|
pkg-config --libs gtk+-2.0
看看路径和版本对上不?
要不你直接把gtk+-2.0的路径加到
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/mygtkdir
试试看
看看路径和版本对上不?
要不你直接把gtk+-2.0的路径加到
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/mygtkdir
试试看
|
这个错误,好像是说“multiple definition 重复定义”?
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。