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
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.
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 ?
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: