LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-12-2012, 09:15 AM   #1
pjg711
LQ Newbie
 
Registered: Feb 2012
Posts: 1

Rep: Reputation: Disabled
Smile error when compiling example gtkimageview


Hello,
When I try to compile with cmake gtkimageview an example I get this error:
------------------------------------------------
[100%] Building C object CMakeFiles/main.dir/interactive.c.o
Linking C executable main
/usr/bin/ld: /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libgtk-x11-2.0.so: undefined reference to symbol 'gdk_draw_pixbuf'
/usr/bin/ld: note: 'gdk_draw_pixbuf' is defined in DSO /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libgdk-x11-2.0.so so try adding it to the linker command line
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libgdk-x11-2.0.so: could not read symbols: Invalid operation
collect2: ld devolvió el estado de salida 1
make[2]: *** [main] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2


This is my CMakeLists.txt:
cmake_minimum_required(VERSION 2.8)
find_package(PkgConfig)
pkg_check_modules(GTK gtk+-2.0)
include_directories(${GTK_INCLUDE_DIRS})

INCLUDE_DIRECTORIES(../../.
../../src)

## Libreria gtkimageviewer
ADD_LIBRARY(VIEWER ../../src/cursors.c
../../src/gtkanimview.c
../../src/gtkimagenav.c
../../src/gtkimagetooldragger.c
../../src/gtkimagetoolselector.c
../../src/gtkimageview-marshal.c
../../src/gtkzooms.c
../../src/utils.c
../../src/gdkpixbufdrawcache.c
../../src/gtkiimagetool.c
../../src/gtkimagescrollwin.c
../../src/gtkimagetoolpainter.c
../../src/gtkimageview.c
../../src/gtkimageview-typebuiltins.c
../../src/mouse_handler.c
)

ADD_EXECUTABLE(main interactive.c )

TARGET_LINK_LIBRARIES(main ${GTK_LIBRARIES} VIEWER)
--------------------------

Thank you very much.
Pablo from Rosario,
Argentina
 
Old 02-13-2012, 03:21 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,311

Rep: Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353
Welcome to LQ.

Looks like Ubuntu 11.10
http://www.linuxquestions.org/linux/...Ask_a_Question
http://linuxsilo.net/docs/smart-questions_en.html


Assume the git version of gtkimageview http://trac.bjourne.webfactional.com/
→ svn co http://publicsvn.bjourne.webfactional.com/gtkimageview


There are two build systems included, waf and autotools.
Both works perfectly : 1) ./waf configure && ./waf
2) ./autogen.sh && make


I guess you will have to do those two first, and see how
the code is generated, and then use the same CFLAGS etc.
when adding a cmake build system.
http://www.cmake.org/Wiki/CMake_Useful_Variables
http://www.cmake.org/cmake/help/documentation.html
.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Build fails in current: gtkimageview-1.6.4 damgar Slackware 2 02-14-2010 10:18 AM
Fedora 9: error when compiling flash plug-in with error failed dependencies seow_ming Fedora 2 06-17-2008 07:17 PM
Error when compiling kernel linux-2.6.22 : make: ***[_modinst_post] Error 137 ngoclan.it Linux - Newbie 0 12-12-2007 03:44 PM
Error when compiling kernel linux-2.6.22 : make: ***[_modinst_post] Error 137 ngoclan.it Linux - General 1 12-11-2007 06:54 AM
i get an error ./term.c :95 error conflicting types of tpam when compiling bitchx eveningblush Programming 0 03-30-2006 06:46 AM


All times are GMT -5. The time now is 04:49 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration