Code::Blocks Forums
User forums => Help => Topic started by: nyislander on May 16, 2019, 11:32:02 pm
-
This problem just started recently. When I create a release/debug version of my C++ console program C::B outputs a shared library instead of an *.exe file. I purged C::B and its config file and reinstalled with default settings but I get the same result. I can launch the program inside of C::B and it runs fine. If I create a new "Hello World!" program the same thing happens when I compile it.
C::B 16.01 on Ubuntu 18.04.2 LTS (Xubuntu).
C::B installed using "Software 3.28.1" or via console commands - same results.
Any suggestions?
-
Post a full re-build log of the project.
Tim S.
-
Thanks Tim.
-------------- Clean: Release in junk (compiler: GNU GCC Compiler)---------------
Cleaned "junk - Release"
-------------- Build: Release in junk (compiler: GNU GCC Compiler)---------------
g++ -Wall -fexceptions -O2 -c /home/mike/Desktop/junk/main.cpp -o obj/Release/main.o
g++ -o bin/Release/junk obj/Release/main.o -s
Output file is bin/Release/junk with size 5.98 KB
Process terminated with status 0 (0 minute(s), 3 second(s))
0 error(s), 0 warning(s) (0 minute(s), 3 second(s))
-
I am guessing the file extension is missing, is this correct?
If yes, check the C::B setting.
Project -> Properties
Tab: Build Targets
Check the values of the "release" build target
Values to check include
"Type:" with likely good values of "Console"
"Output filename:" with value likely of "junk" that you want to be "junk.exe"
Tim S.
-
Uhm, apparently the OP is on Linux, there are no .exe files on Linux, binaries usually have no extension at all. Don't know why he thinks a shared object file (extension .so) gets created, but from the log and the statement that CodeBlocks can execute the program, i see no error here.
Hopefully he doesn't think that adding an .exe extension makes the program runnable on Windows?
-
Thank you Tim & sodev.
This is my fault, I don't know why I made such a simple error. I made the mistake of not executing the program properly: ./junk
There is no extension on the executable.