Author Topic: First Time User simple question (Ubuntu)  (Read 3902 times)

Offline Witchlover

  • Single posting newcomer
  • *
  • Posts: 2
First Time User simple question (Ubuntu)
« on: May 30, 2011, 07:01:07 pm »

First, I must say that I have switched from Windows using VS to running Linux and now using Code::Blocks. The learning curve going from VS to Code:Blocks has me confused about, well, a lot of things, but I will just ask one question at a time.

1. Building a simple "hello world" console App:
When "releasing" the App within code::blocks, all I end up with is an executable that does not run when double clicked. Or, I end up with only a "main.o" object file vs. an executable. If I am simply trying to make a "hello world" console App executable that I can open and run, what am I doing wrong, or, what do I need to do?

If I haven't provided enough info, let me know. Thanks. ;)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: First Time User simple question (Ubuntu)
« Reply #1 on: May 30, 2011, 08:01:27 pm »
Turn on Full Compiler Logging.
A real programmer should be able to see what is happening by looking at the Compiler Log.

http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

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

Offline Witchlover

  • Single posting newcomer
  • *
  • Posts: 2
Re: First Time User simple question (Ubuntu)
« Reply #2 on: May 31, 2011, 01:37:21 am »

"A real programmer should be able to see what is happening by looking at the Compiler Log."

I am a beginning programmer. To explain a little more for perhaps some more help:

I am making the simple "Hello world" console app in Code::Blocks in Ubuntu. I installed the necessary "build-essentials" and basically just went for it using the code I knew from making a "Hello world" app in VS. The problem is, that when I tick "Build Target" to "Release", and then click "Build and Run", the program runs fine, however, the executable file created under bin/RELEASE target does not run, that is, it does nothing when clicked on.

Am I doing something wrong?

stefanos_

  • Guest
Re: First Time User simple question (Ubuntu)
« Reply #3 on: May 31, 2011, 07:07:38 am »
Witchlover,

Moving from Windows to GNU / Linux Ubuntu was a wise choice of yours; greatly appreciated by an FOSS enthusiast like myself.

You have to understand though a few things:

GNU / Linux Ubuntu is NOT Windows...so in order to run an executable, a console app of course, you have to open your terminal and run commands like
Code
./hello_world
. To double-click on an executable of yours and produce an output, it has to be of a GUI form, and especially if it's a wxWidgets executable, you have to obey the standards which are included in Code::Blocks's Wiki. In your case though, that is you are under GNU / Linux Ubuntu that won't be a problem; you will compile just fine and it will work.