Cc compilation error because of library PATH

hello NOMAD professionals,

i have a C code and motif GUI.
the code is already compiled on a freebsd 12.1 tower with :slight_smile:
cc -L/usr/local/lib -I/usr/local/include -o example1 example1.c -lXm -lXt -lX11

you see that -L/usr/local/lib and -I/usr/local/include , includes the path and libraries of motif to the compiler that he know that.

but on the NOMADBSD Drive OS i have here too the path and library parth are different. i cannot compile with this line of instructions on nomadbsd.

the error message is : fatal error: ‘Xm/Xm.h’ file not found.

where are the paths on nomadbsd ???

any help is appreciated.

Kindly Regards


NomadBSD is just a pre-configured FreeBSD, so it shouldn’t make a difference.

Since the Open Motif libs are under /usr/local/include/X11 (/usr/local/include/Xm/Xm.h does not exist), you have to add -I/usr/local/include/X11

1 Like

thank you mk1 ,

i have tried :slight_smile:
cc -L/usr/local/lib -I/usr/local/include/X11 -o example1 example1.c -lXm -lXt -lX11

there is the same error : Xm/Xm.h not found.

there must be something different in nomadbsd because the same path works on the
FreeBsd 12.1 Pc Tower where bsd is installed.
-I/usr/local/include there is X11.

uuuuuppps ,

i have checked here. motif wasnt installed. he he he

my mistake. a good joke.

motif isn’t already installed in the nomadbsd composition. So i installed it.

i really appreciate the impressive work of NOMADBSD programmers.

NomadBSD is a really UNIX.

Now i am able to work with a real UNIX OS on small external HD drive without install such like FreeBSD.

The compilation works fine as described here at the top of posting. same as FreeBSD.

Plus , nomadbsd users see this posting likea appetizer,
perhaps are interesting in C and Motif programming too.

Thank you to NOMADBSD.

i have checked it out. YES … , a compiled program from NOMADBSD
one click executable,
works on FREEBSD 12.1 too !!!