Motif gui programming !

MOTIF GUI PROGRAMMING !
Hi there. I am a MOTIF GUI Programmer in C language.
After a longer break i have problems with the GCC compiling.
my MOTIF file is named winstack.c
I have the follow code

 gcc -o newprogram  winstack.c  -lXm -lXt -lX11 

The compilation runs good.
But no executable LINUX FILE is created. except a file named newprogram.
The properties of the file in the context menue is "shared library" not "executable".
Thats my problem.
From commandline is no problem with ./newprogram. A GUI Windows is opening.
How about a real linux exe to start with one click in file explorer ???
Kindly Regards
SM

What window manager are you using?

What version of linux are you using?

Hi , the problem is solved. I have installed CLANG compiler , that works.
I have Sparky Linux OS.

Windowsmanager. I dont know what that is.

2 Likes

:b: for that statement.

1 Like

hi,
windowsmanager ? What does it matter ? The EXE must RUN ! RUN !

For myself. I program single short applications that RUN immediatelly.
code / GUI / Network READY.
Only application - only for Linux. NOTHING ELSE.

Tequila on the beach.

Then see this reference, and learn something new:

Motif Window Manager - Wikipedia

and see also:

Window manager - Wikipedia

Hopefully, you know what a window manager is now :slight_smile:

From above:

Every graphical user interface based on a windows metaphor has some form of window management.

So, you should probably learn and know what a window manager is, since you are using MOTIF .... :slight_smile:

You made your executable correctly. It should have worked. It did work -- except, not in your window manager.

There could have been -- and may still be -- issues with your window manager, whatever it is. Without knowing what it is, we can't say what issues. Each has its own peculiarities. They aren't uniform.

If you don't know what it is, I strongly recommend you find out.

ms windowzers normaly don't know what a wm is, but linuxers usually do.

1 Like

Hi Corona 688,

stay cool. MOTIF works fine. It is not about that Gui Library. The Windows are opening like crazy horses.

Its about Sparky Linux. I have posted there and they don't know until now. (pending)

If a normal c script is not really compiling with GCC , i as user cannot find out easy in the OS.
CLANG works.
I take it. Otherwise to change the OS only of GCC ? Not.
Look.
I have installed Sparky Linux and updated properly. The system is up to date.
On both computers a simple c script is compiled with GCC ONLY TO A LIBRARY.
So i do NOTHING and this posting is solved i recommend.

Example :

main ()
                  {
                   printf( "Hell is filled with amateur musicians. \n");
                  }

gcc simple.c

filename a.out
filetype shared library

starting from terminal is possible with

./a.out 

you understand ? Its inside Sparky linux.

Please declare this post as solved.

The result is :

compiling a simple c script with GCC does not make an executable but shared library instead !
tested on two different computers with sparky LINUX. updated ok.
the error is hard to find.
CLANG works , so i take clang instead of changing the OS to other Linux distribution.
That sounds realistic isn't it ?

Usually a.out is a real executable. Test it with

file a.out

The name "a.out" can be changed with -o "filename" ... .

You can edit the tags yourself and add a solved tag.

Yeah, as someone who built security UIs between development and production environments decades ago with MOTIF, I find it strange that people who program in MOTIF today do not know a "window manager" is.

Even more strange is the fact they don't know what a WM is even though they are using one!

Even a Linux user should know! For example, here is an article:

Best 20 Linux Window Managers: A Comprehensive List for Linux Users

Arch Linux Wiki on Window Managers

What are the best window managers for Linux? - 48 Listed

... and the original posts wrote, as I recall... "I use Sparky.... !!!"

Well, Sparky also uses Window Managers for GUI, see:

Sparky Linux - window manager

Seems "someone" may be over compensating by projecting "great knowledge" about something they do not really understand at all :slight_smile: