Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-25-2012, 01:42 AM   #1
chris_c
Member Retired
chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.
 
Posts: 38
Karma: 134098
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
chris_c is offline   Reply With Quote
Old 08-25-2012, 03:13 AM   #2
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,667
Karma: 5850002
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by chris_c View Post
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 ?)
What absolute path?
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?
knc1 is offline   Reply With Quote
Old 08-25-2012, 05:40 AM   #3
chris_c
Member Retired
chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.
 
Posts: 38
Karma: 134098
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
chris_c is offline   Reply With Quote
Old 08-25-2012, 08:44 AM   #4
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,667
Karma: 5850002
Join Date: Feb 2012
Device: Too many.
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.
knc1 is offline   Reply With Quote
Old 08-25-2012, 08:49 AM   #5
chris_c
Member Retired
chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.
 
Posts: 38
Karma: 134098
Join Date: Aug 2012
Device: kindle touch
Quote:
Originally Posted by chris_c View Post
-- the quick and dirty (not recommended) cross compile bodge --
it works just fine, sufficient that I have almost finished a quick sudoku app

bare in mind the includes that user code includes are platform agnostic...
chris_c is offline   Reply With Quote
Old 08-25-2012, 08:52 AM   #6
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,667
Karma: 5850002
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by chris_c View Post
it works just fine, sufficient that I have almost finished a quick sudoku app

bare in mind the includes that user code includes are platform agnostic...
Keep in mind that is the way it is **supposed** to be.
Which unfortunately is not guaranteed in the real world.
knc1 is offline   Reply With Quote
Old 08-25-2012, 09:03 AM   #7
chris_c
Member Retired
chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.chris_c can bend spoons with a thought.
 
Posts: 38
Karma: 134098
Join Date: Aug 2012
Device: kindle touch
if by supposed you mean the whole point of a cross platform GUI library, then, yes )
chris_c is offline   Reply With Quote
Old 08-25-2012, 09:19 AM   #8
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,667
Karma: 5850002
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by chris_c View Post
if by supposed you mean the whole point of a cross platform GUI library, then, yes )
I wasn't very clear was I? My bad. I meant as a general rule, inclusive of GUI libraries.

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.
knc1 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 01:19 PM.


MobileRead.com is a privately owned, operated and funded community.