Code::Blocks

User forums => Help => Topic started by: spiccato on September 05, 2018, 11:03:48 pm

Title: Cannot build/run code
Post by: spiccato on September 05, 2018, 11:03:48 pm
Just got Code::Blocks, running it on linux mint. Every time I try to run the code it just gives me the message "It seems that this file has not been built yet. Do you want to build it now?"  and when I click yes it just repeats it.
Title: Re: Cannot build/run code
Post by: stahta01 on September 05, 2018, 11:24:07 pm
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F)

Do you have an compiler installed?

Tim S.
Title: Re: Cannot build/run code
Post by: spiccato on September 05, 2018, 11:28:46 pm
Yes, I have the G++ compiler.
Title: Re: Cannot build/run code
Post by: stahta01 on September 05, 2018, 11:29:47 pm
Post the build log!
Title: Re: Cannot build/run code
Post by: spiccato on September 05, 2018, 11:35:55 pm
Code: [Select]
Nothing to be done (all items are up-to-date).

Checking for existence: /home/usr/Untitled Folder/Untitled1
Title: Re: Cannot build/run code
Post by: stahta01 on September 05, 2018, 11:37:03 pm
READ THE LINK I POSTED!
Title: Re: Cannot build/run code
Post by: stahta01 on September 05, 2018, 11:57:13 pm
Also, spaces in the path can sometimes cause problems.

Tim S.
Title: Re: Cannot build/run code
Post by: spiccato on September 06, 2018, 12:36:52 am
Build log:
Code: [Select]
gcc   -c "/home/usr/Untitled Folder/Untitled1.c" -o "/home/usr/Untitled Folder/Untitled1.o"
g++  -o "/home/usr/Untitled Folder/Untitled1" "/home/usr/Untitled Folder/Untitled1.o"   
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 
Checking for existence: /home/usr/Untitled Folder/Untitled1
Executing: xterm -T '/home/usr/Untitled Folder/Untitled1' -e /usr/bin/cb_console_runner "/home/usr/Untitled Folder/Untitled1" (in /home/usr/Untitled Folder)
Process terminated with status -1 (0 minute(s), 2 second(s))
 

This is when I run the code.
Title: Re: Cannot build/run code
Post by: BlueHazzard on September 06, 2018, 01:36:32 am
do you have xterm installed?

if not you can change the default terminal in Settings->environment->Shell to run commands in...

Or you install xterm...
Title: Re: Cannot build/run code
Post by: spiccato on September 06, 2018, 01:41:38 am
That was the problem, thank you so much!