User forums > Help
C::B creates a shared lib instead of an app under Kubuntu
PeterP:
hi,
I'm not sure if this is a problem with Linux (Kubuntu) or C::B...
I used C::B for many years under Windows and never had a problem...
but now under Kubuntu I have this problem...
I create a GUI application (although it doesn't matter the problem also occures with console apps)...
inside C::B everything works fine, as expected...
but when I go to the folder where the created file is located the file is not an app, but a shared lib !!!
and I can't run it outside C::B unless I use XTerm to run it...
for illustration I made a Youtube video: https://www.youtube.com/watch?v=AzFZ6uqaTDw
Kubuntu and Code::Blocks are the latest versions and updates...
what could be the problem and how can I solve it ???
thanks
stahta01:
Post a full rebuild log.
http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
BlueHazzard:
It would also be good to post a "ls -la" output from the folder where the executable is.
PeterP:
here is the build log
--- Code: ----------------- 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))
--- End code ---
and a screenshot of the output from ls -la
cacb:
I saw a similar problem after installing Kubuntu 17.04. I don't think it is caused by Code::Blocks, but gcc.
Check if you can run your application from a terminal, it should start just fine. Then if you are unable to run the same program by clicking on it in Dolphin, you are most likely looking at this problem:
GCC compiles programs to shared object instead of executable, preventing GUI file managers from executing programs
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1639531
Navigation
[0] Message Index
[#] Next page
Go to full version