Openmotif toolkit!

I'm using ubuntu 9.10 as OS and i installed a toolkit of widgets: openmotif.
The packages are: libmotif3, libx11-dev, libxp-dev, libxt-dev, x-dev. How can I compile a program including the MOTIF toolkit?

I tried:

gcc <my_file.c> -L /usr/lib/

It doesn't work

I don't know very much the linking process of C, and I'm not an expert of GUI creared by this wonderful programming language, but i want to learn.

Someone help this poor newbie! Thanks for all answer! :slight_smile:

-L only tells it where, not what. Try -lXm

I wonder what does that mean? What do the error messages say?
How does your code look like?
I guess you include Xm.h and/or XmAll.h header files?
Those should be located in /usr/include/Xm
You'll want to check the Programmer's Guide too:
Open Motif - Documentation Supplement

Regards,
pc

Excuse for the late answer..... :o

I solved! I have to add -lXm (as you said) and -lXt -lX11
I can compile the programs now.

I'm off-topic, but i did not open a new thread....

Where can I found documentation about motif? I downloaded the manuals, and i'm learning some ancients tutorial that I found; but I havn't a complete guide.

Where you learned motif? Can you suggest me a book

Thanks in advance for any reply! :slight_smile:

no.
documentation is very scarce.
kenton lee

the man pages aren't too bad.
you will need to get used to trawling through the header files too.
there are lots of typedefs.

e.g: man XtIntervalId will say:

   XtIntervalId XtAddTimeOut(unsigned long interval, XtInputCallbackProc
              proc, XtPointer client_data);

what the hell is the correct prototype for an XtInputCallbackProc? I hear you cry. So you need to
grep the header files until you find the typedef

Intrinsic.h on my BSD

typedef void (*XtInputCallbackProc)(
    XtPointer           /* closure */,
    int*                /* source */,
    XtInputId*          /* id */
);

there are some design aids for building the interface:
there is Xdesigner which used to come with the
Sun Studio, though i never got it to work on linux.
and dtcreator used to exist on solaris for
the CDE environment.
but all pretty much ignored.

I gave up on X because designing interfaces is boring without a graphical tool.
I can recommend fltk which has fluid as a lightweight X environment
for knocking up nice little apps without massive Qt GTK dependencies.

Thanks! I'll try what you suggested!

Thanks again! :slight_smile:

PS: Other suggestions are welcome!

---------- Post updated at 02:59 PM ---------- Previous update was at 02:58 PM ----------

EDIT:

What do you think about wxMotif?

THANKS!

never tried wxmotif.

it looks worth a look to me though.
it makes life easier having a form designer.
it's very tedious doing it by hand.

why motif particularly?
motif is a bit of a backwater now, in this millenium.