Author Topic: Code Blocks not building  (Read 80269 times)

Offline cliffrad

  • Single posting newcomer
  • *
  • Posts: 5
Re: Code Blocks not building
« Reply #15 on: October 04, 2017, 10:03:29 pm »
I have the similar problem on my Mac. When I first start a project the Hello World program works correctly then I write a program, press build and run and the Hello World programme is still there. In my tool-chain executables it says /usr.
« Last Edit: October 04, 2017, 10:05:57 pm by cliffrad »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10279
Re: Code Blocks not building
« Reply #16 on: October 05, 2017, 01:09:19 am »
What? I guess you have trouble seeing a terminal...
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline cliffrad

  • Single posting newcomer
  • *
  • Posts: 5
Re: Code Blocks not building
« Reply #17 on: October 05, 2017, 09:18:19 am »
No the terminal comes up after the hello world program correctly then after I build and run a new program the old Hello World program comes up in the terminal again as if I haven't changed the program. Apologies for my ignorance but I am new to programming..cheers

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1520
Re: Code Blocks not building
« Reply #18 on: October 05, 2017, 01:24:14 pm »
A fresh build log would help:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

what operating system are you using?
Are you using projects, or simple files?
What do you change in the hello world program?
Does your anti virus blocks the compiler linker?

Offline cliffrad

  • Single posting newcomer
  • *
  • Posts: 5
Re: Code Blocks not building
« Reply #19 on: October 05, 2017, 06:23:55 pm »
OS X EL CAPITAN

int main()
{
    int a=11, b=2;
    float modulus;
    modulus =a %b;
    printf("product =%f", modulus);
    return 0;
}

The above is my program. as you can see I have deleted the hello world part..
How do I check if the anti virus is blocking the compiler? I have ran programs before..

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5943
    • My Best Post
Re: Code Blocks not building
« Reply #20 on: October 05, 2017, 06:26:10 pm »
@cliffrad: Post a full build log or I will ask you to be blocked because you hijacked a thread!

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

Offline cliffrad

  • Single posting newcomer
  • *
  • Posts: 5
Re: Code Blocks not building
« Reply #21 on: October 05, 2017, 07:07:46 pm »
you mean like??;


-------------- Build: Debug in C (compiler: GNU GCC Compiler)---------------

Target is up to date.
Nothing to be done (all items are up-to-date).


-------------- Run: Debug in C (compiler: GNU GCC Compiler)---------------

Checking for existence: /Users/cliffhopkins/Desktop/C/bin/Debug/C
Executing: osascript -e 'tell app "Terminal"' -e 'activate' -e 'do script "/Users/cliffhopkins/Downloads/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/cliffhopkins/Desktop/C/bin/Debug/C "' -e 'end tell'  (in /Users/cliffhopkins/Desktop/C/.)
Process terminated with status 0 (0 minute(s), 0 second(s))
 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5943
    • My Best Post
Re: Code Blocks not building
« Reply #22 on: October 05, 2017, 07:15:48 pm »
No I mean doing a full rebuild instead of doing a build! And, post the log.

You can either clean then build; or just use rebuild!

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

Offline cliffrad

  • Single posting newcomer
  • *
  • Posts: 5
Re: Code Blocks not building
« Reply #23 on: October 05, 2017, 07:51:36 pm »

Same happens;

-------------- Build: Debug in C (compiler: GNU GCC Compiler)---------------

Target is up to date.
Nothing to be done (all items are up-to-date).

Last login: Thu Oct  5 18:49:54 on ttys000
Cliffs-MacBook-Pro:~ cliffhopkins$ /Users/cliffhopkins/Downloads/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/cliffhopkins/Desktop/C/bin/Debug/C
Hello world!

Process returned 0 (0x0)   execution time : 0.005 s
Press ENTER to continue.




-------------- Run: Debug in C (compiler: GNU GCC Compiler)---------------

Checking for existence: /Users/cliffhopkins/Desktop/C/bin/Debug/C
Executing: osascript -e 'tell app "Terminal"' -e 'activate' -e 'do script "/Users/cliffhopkins/Downloads/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/cliffhopkins/Desktop/C/bin/Debug/C "' -e 'end tell'  (in /Users/cliffhopkins/Desktop/C/.)
Process terminated with status 0 (0 minute(s), 0 second(s))



 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5943
    • My Best Post
Re: Code Blocks not building
« Reply #24 on: October 05, 2017, 09:40:58 pm »
Someone else try to help the ignorant MAC OS user; I give up; if he/she can not do a rebuild instead of a build I can NOT help them.

Edit: Added link on how to do rebuild: http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Tim S.
« Last Edit: October 05, 2017, 09:53:16 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org