here is the build log
-------------- Clean: Release in test-fltk (compiler: GNU GCC Compiler)---------------
Cleaned "test-fltk - Release"
-------------- Build: Release in test-fltk (compiler: GNU GCC Compiler)---------------
g++ -I/usr/local/include -I/usr/local/include/FL/images -D_THREAD_SAFE -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -s -I/usr/local/include -I/home/acki/Libs/cTools -I/home/acki/Libs/cTools/XMLDoc/include -c /home/acki/Source/test2/main.cpp -o ./obj/Release/main.o
g++ -I/usr/local/include -I/usr/local/include/FL/images -D_THREAD_SAFE -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -s -I/usr/local/include -I/home/acki/Libs/cTools -I/home/acki/Libs/cTools/XMLDoc/include -c /home/acki/Source/test2/window.cpp -o ./obj/Release/window.o
g++ -L/usr/local/lib -L/home/acki/Libs/cTools/XMLDoc -o ./bin/test-fltk ./obj/Release/main.o ./obj/Release/window.o -lfltk -lm -lX11 -lXext -lXinerama -lXfixes -lXft -lXrender -lfontconfig -ldl -lfltk_forms -lfltk_gl -lfltk_images -lfltk_jpeg -lXMLDoc
Output file is ./bin/test-fltk with size 914.76 KB
Process terminated with status 0 (0 minute(s), 1 second(s))
0 error(s), 0 warning(s) (0 minute(s), 1 second(s))
and a screenshot of the output from ls -la
(http://abusoft.bplaced.net/Image3.jpg)
but maybe you know a solution ???
First of all it is not unique to Kubuntu or KDE, but any Linux desktop I think. The problem is that gcc generates PIE (Position Independent Executable) code, which the file browsers believe is shared object files, and therefore they will not run them when a user clicks on the file. It looks like nobody takes responsibility to solve this annoying problem. But I did implement my own work-around. I created a file
~/.local/share/applications/RunExec.desktop
With the contents:
[Desktop Entry]
Exec=%f
MimeType=application/x-sharedlib;
Name=RunExec
NoDisplay=true
Type=Application
Essentially it fools KDE to run the program when clicking on it, even if it thinks it is a shared library. Now, if it really is a shared library, you will get an error which is fine.
Once they get this issue sorted out, we should just delete ~/.local/share/applications/RunExec.desktop