08-25-2012, 01:42 AM | #1 |
Member Retired
Posts: 38
Karma: 134108
Join Date: Aug 2012
Device: kindle touch
|
linking to gtk [solved]
I've successfully compiled xlib applications and even source using Xaw by copying kindle libs to my pc and using arm-linux-gnueabi-gcc-4.6
However programming with Athena widgets is as much fun as stabbing yourself in the eye with a rusty fork... I tried out compiling simple gtk source code, but it seems to want to link pthreads from a absolute path :/ anyone got gtk apps compiled for the kindle ? (ideally without a chroot jail ?) Last edited by chris_c; 08-25-2012 at 05:42 AM. Reason: added [solved] to title |
08-25-2012, 03:13 AM | #2 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
gcc -v .... will help you answer that question. Include in your reply the full gcc command line being used. What Kindle? Yes, it makes a difference to the answer. P.S: What version of gtk or gtk2? |
|
Advert | |
|
08-25-2012, 05:40 AM | #3 |
Member Retired
Posts: 38
Karma: 134108
Join Date: Aug 2012
Device: kindle touch
|
never mind, I tried again from scratch and typically can't replicate the problem, on the plus side it does mean I can compile gtk+-2.0 apps for my kindle touch.
-- the quick and dirty (not recommended) cross compile bodge -- to avoid having a bunch sym links when copying the kindle libs to my pc I dropped the version numbers after the .so so libBlah-2.0.so.1.2.3 becomes libBlah-2.0.so I stuck these in a local (to my dev folder) directory called libs I'm using the includes from the host (which seems to work!) arm-linux-gnueabi-gcc-4.6 gtk.c `pkg-config --cflags gtk+-2.0` -L./libs -lgtk-x11-2.0 -lgdk-x11-2.0 -lXrender -lXinerama -lXext -latk-1.0 -lcairo -lexpat -lffi -lfontconfig -lfreetype -lgdk_pixbuf-2.0 -lgio-2.0 -lglib-2.0 -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lpango-1.0 -lpangocairo-1.0 -lpangoft2-1.0 -lpixman-1 -lpng12 -lxcb-render -lxcb-shm -lXdamage -lXfixes -lz -lX11 -lxcb -lXau -lXdmcp -o gtktest needless to say I'll be making a Makefile before long.... Last edited by chris_c; 08-25-2012 at 05:43 AM. Reason: typo |
08-25-2012, 08:44 AM | #4 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Destroying the soname, naming conventions is not something to be recommended.
Are you doing this work on a file system that does not support symbolic links? Using the host includes is not something to be recommended. That will fail as soon as you encounter an include that contains code or one of the systems (host or target) changes so that the includes are not compatable. I would strongly suggest that you spend your time setting up a proper cross-compile environment before wasting your time with creating a Makefile built to fail. |
08-25-2012, 08:49 AM | #5 |
Member Retired
Posts: 38
Karma: 134108
Join Date: Aug 2012
Device: kindle touch
|
|
Advert | |
|
08-25-2012, 08:52 AM | #6 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Which unfortunately is not guaranteed in the real world. |
|
08-25-2012, 09:03 AM | #7 |
Member Retired
Posts: 38
Karma: 134108
Join Date: Aug 2012
Device: kindle touch
|
if by supposed you mean the whole point of a cross platform GUI library, then, yes )
|
08-25-2012, 09:19 AM | #8 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
But we are on the same track here. For the non-programmers reading this - "Includes" in the "C" (or "C++") language are "header files" and the design intent behind header files is that they should never cause (or contain) code generation statements. Not all source code authors follow that rule. Here, this "quick and dirty" happens to work, today. It may not work tomorrow and the O.P. is aware of this, this post is just so that other readers are aware also. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is a gtk version possible? | frandavid100 | Calibre | 14 | 12-16-2008 03:09 PM |
iLiad [ILIAD]GTK developpement | Olivier78180 | iRex Developer's Corner | 7 | 07-14-2008 05:22 PM |
iLiad Changing the GTK+ Theme | yokos | iRex Developer's Corner | 0 | 02-20-2008 09:47 AM |
iLiad Need help getting started with gtk | tribble | iRex Developer's Corner | 4 | 06-05-2007 12:38 PM |
GTK+ Plucker viewer | rsperberg | Reading and Management | 0 | 11-21-2005 02:14 PM |