User forums > Help

[SOLVED for now] [I am new to CODE::BLOCKS, and I'm stuck!

(1/1)

James_Elliott:
HI,
I went to www.learncpp.org to learn C++. I followed their instructions to install the CODE::BLOCKS IDE on Linux Mint 19 Cinnamon, without much success.
I then went to the Linux Mint forums and followed their instructions to download and install the CODE::BLOCKS IDE using a terminal window - this worked! After a two-stage download and installation process (GCC + CODE::BLOCKS), I ended up with the CODE::BLOCKS IDE installed on my Linux PC, and listed under 'Programming' on my Mint main menu.

When I click on the icon for CODE::BLOCKS

* the application fires up and presents me with the IDE
* I can initiate a New Project and save it
* I can write my C++ code (e.g. 'Hello World')but when I click on 'Compile' nothing seems to happen and no new .cpp executable file appears in my directories.

If any of you clever people could point me in the right direction I would be very grateful.

I am learning C++ to use with Arduino microcontroller boards.

Many thanks,  James

BlueHazzard:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

blauzahn:
first, please verify that you can compile and run your hello_world.cpp from the commandline:


--- Code: ---g++ -Wall hello_world.cpp && ./a.out

--- End code ---

Then start Code::Blocks and check, if your compiler path and executables are
set correctly (see: settings|compiler|toolchain executables. Probably, your
path for the selected GNU GCC Compiler should be /usr and the C++ Compiler g++.

In Order to see the executed commands when you start to compile, please
go to settings|compiler|other settings and select as compiler protocol:
full commandline. Once, you have closed the settings, open view|Logs (F2).
When you start compiling your hello world project from inside Code::Blocks,
the appropriate commands should show up the logs.

If compiling and linking were sucessfull, the binary for target Debug is
by default in the project's subdirectory bin/Debug. This you can start
from Code::Blocks or from the commandline.

I hope, this helps.

James_Elliott:
Thanks to all of you who tried to help.  As far as I can see, I have all my components in the directories you nominated, but still, nothing happens when I click on Build & Run, and there is no executable created - in Linux, that is.  However, CODE::BLOCKS downloaded and installed into Windows 10 does work! While Windows displeases me in so many ways, I have to admit that it is so much easier to install applications under Windows than it is under Linux. So, for the time being, I will use the Windows version of CODE::BLOCKS to teach myself C++ and when I have time I will revise my knowledge of Linux (I graduated from university with an IT degree in 2003, so I have forgotten a lot of what I learned about Linux). Then I might be able to understand your advice. What is quite clear and logical to you competent Linux users is just gobbly-gook to those of us who do not know Linux, or have not used it for a decade or more and forgotten most of what we once knew. When I have re-learned Linux, I will re-read your advices and try and sort out my copy of CODE::BLOCKS, and, hopefully, get away from using Windows.

Many thanks, James.

stahta01:
It is really too bad that a College Degree does not teach how to cut and paste.
Note: This is not sarcasm, I learned on the job how to cut and paste from a cmd.exe prompt.
There is a lot of basic info that is never covered in a college degree.
And, I have a 4 year Degree in Computer Science.

Tim S.

Navigation

[0] Message Index

Go to full version