gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Does OpenCOBOL support the GIMP ToolKit, GTK+?


From: Michael Anderson
Subject: Re: [open-cobol-list] Does OpenCOBOL support the GIMP ToolKit, GTK+?
Date: Sun, 27 Jan 2013 14:17:24 -0600
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

Thought I'd try to help, but no go.

You may have other problems after you solve this one.

Looking at the output from pkgconfig, I changed -pthread to -lpthread, by removing the 'pkg-config --cflags gtk+-2.0', and manually entering the output from pkg-config --cflags gtk+-2.0

Just enter “pkg-config --cflags gtk+-2.0” at the command-line and you'll see what I mean.
Then modify the cobc command as follows:

cobc -v -c -lpthread -I/usr/include/gtk-2.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12  ocgtk.cgcc -pipe -c -I/usr/local/include   -Wno-unused -fsigned-char -Wno-pointer-sign -I/usr/include/gtk-2.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12  -o ocgtk.o ocgtk.c

What cause pkgconfig to output -pthread instead of -lpthread, I have no idea!
So trying cobc again with -lpthread, You may then end up with:
fatal error: ocgtk.h: No such file or directory

So just 'touch ocgtk.h'

I've heard that this is just a empty file anyway.

So try the above cobc again, and I get:

ocgtk.c: In function ‘CBL_OC_GTK_WINDOW_SET_TITLE’:
ocgtk.c:46:29: error: invalid type argument of ‘->’ (have ‘int’)
ocgtk.c:48:34: error: invalid type argument of ‘->’ (have ‘int’)
ocgtk.c: In function ‘CBL_OC_GTK_MENU_ITEM_NEW_WITH_LABEL’:
ocgtk.c:130:29: error: invalid type argument of ‘->’ (have ‘int’)
ocgtk.c:132:34: error: invalid type argument of ‘->’ (have ‘int’)
ocgtk.c: In function ‘CBL_OC_GTK_ENTRY_GET_TEXT’:
ocgtk.c:203:34: error: invalid type argument of ‘->’ (have ‘int’)

Now I'm afraid that I can't help anymore.
I know gtk and OpenCOBOL does work, so, maybe Brian will soon come and set me straight.

--
Mike.

On 01/27/2013 12:21 PM, Paride Desimone wrote:
Hi, I try to compile examples in section  5.53 from the OpenCOBOL FAQ.
I try this on Debian Squeeze, with  libgtk2.0, libgtk2.0-dev, gtk2.0, 
pkg-config from squeeze-backports.
when i try to compile,

cobc -c `pkg-config --cflags gtk+-2.0` ocgtk.c
cobc -x `pkg-config --libs gtk+-2.0` gtkhello.cob ocgtk.o

cobc report this error:

cobc: unrecognized option '-pthread'

Anyone are be able to help me?

Paride


reply via email to

[Prev in Thread] Current Thread [Next in Thread]