April 19, 2024, 12:27:40 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Curiosity killed the....... well, you know.

Started by Doc, May 31, 2007, 10:59:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Doc

Paul,
It's probably beyond my understanding or usefulness at this point, but...

Are we able to link to shared libs (.so) files yet?
Are we able to make GTK calls directly yet?

If so, when you have some time would you mind throwing together some very simple examples, please.  ;D

-Doc-

P.S. I'm having a blast with this already!
Thank you!!!

Ionic Wind Support Team

You already have the examples ;)

gtk_main is a function in gtk-x11-2.0.so

The declare for the shared library function looks liike

declare cdecl extern gtk_main()

Look at the ld line again:

ld -lc -lgtk-x11-2.0 -o "heapsort" "heapsort.o" /usr/lib/libebasic.a --dynamic-linker /lib/ld-linux.so.2

libebasic.a is a static library
-lc is the shared C library, when using -l you omit the .so part

So all you need to do is declare cdecl extern the function and include the library on the linker line.  In the case of GTK2.0 it is already being linked of course.

Paul.
Ionic Wind Support Team