Author Topic: C::B Only Outputs Shared Libraries  (Read 3392 times)

Offline nyislander

  • Multiple posting newcomer
  • *
  • Posts: 10
C::B Only Outputs Shared Libraries
« 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: C::B Only Outputs Shared Libraries
« Reply #1 on: May 16, 2019, 11:46:10 pm »
Post a full re-build log of the project.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline nyislander

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: C::B Only Outputs Shared Libraries
« Reply #2 on: May 17, 2019, 12:40:46 am »
Thanks Tim.

Quote
-------------- 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))

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: C::B Only Outputs Shared Libraries
« Reply #3 on: May 17, 2019, 03:03:09 am »
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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: C::B Only Outputs Shared Libraries
« Reply #4 on: May 17, 2019, 04:07:12 am »
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?

Offline nyislander

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: C::B Only Outputs Shared Libraries
« Reply #5 on: May 17, 2019, 12:55:24 pm »
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.