Code::Blocks Forums

User forums => Help => Topic started by: Missinginaction on September 02, 2011, 05:45:53 am

Title: Code Blocks not building
Post by: Missinginaction on September 02, 2011, 05:45:53 am
Hi! I recently install the program on my Win 7 64bit system. However it doesn't seems to be building. I tried building my code yet I have no respond from the program. I tried the hotkey and the menu and it still refuse to work. If I click "run" the command box will show up if I choose to run without building. Is there anyway I can fix this problem?

P.S. I am using the 10.05 version
Title: Re: Code Blocks not building
Post by: ollydbg on September 02, 2011, 07:29:20 am
What exact problem did you meet?
Can you give us a step by step introduction?
Title: Re: Code Blocks not building
Post by: Jenna on September 02, 2011, 08:05:47 am
Do you have a valid compiler installed, and are the settings for the toolchaion correct ?
"Settings -> Compiler and debugger -> [your compiler] -> Toolchain executables"
Title: Re: Code Blocks not building
Post by: emark.mark20 on September 03, 2011, 02:48:41 am
im having the same problem myself
Title: Re: Code Blocks not building
Post by: ollydbg on September 03, 2011, 02:57:03 am
im having the same problem myself
Tell us the problem in details. What's your problem? How to reproduce? Did you install a correct compiler?....
Title: Re: Code Blocks not building
Post by: emark.mark20 on September 03, 2011, 11:22:04 pm
im having the same problem myself
Tell us the problem in details. What's your problem? How to reproduce? Did you install a correct compiler?....

http://forums.codeblocks.org/index.php/topic,15207.0.html

i posted a similar topic. btw im using windows 7, my codeblocks is 10.05 and my problem is that my program won't build at all.
Title: Re: Code Blocks not building
Post by: ollydbg on September 04, 2011, 01:32:01 am
http://forums.codeblocks.org/index.php/topic,15207.0.html
i posted a similar topic. btw im using windows 7, my codeblocks is 10.05 and my problem is that my program won't build at all.
That post still need more details, I can't help you unless you give me more details and steps.
Title: Re: Code Blocks not building
Post by: Missinginaction on September 08, 2011, 05:40:28 am
Well I talked to my college professor about this problem, it seems that compiler is not working on the 64 bit system so that's why its not building. I tried to install a compiler for the 64 bit system but still don't have any luck on the program. Code blocks failed to detect the compiler and I even tried to manually open the location of the compiler on the tool executable but it can't detect the compiler either (on the list of executable it only shows compilers for the 32 bit system). So now I am still stuck with code blocks not able the build the program. Is there any way that I can get other compilers on the OS? Or is there any other solutions to the problem?
Title: Re: Code Blocks not building
Post by: stahta01 on September 08, 2011, 05:55:09 am
@Missinginaction:

What is the name and version of the Compiler you installed?

What was the installation path of the Compiler you installed?

Tim S.
Title: Re: Code Blocks not building
Post by: Jenna on September 08, 2011, 08:09:45 am
Normally 32-bit applications run without problems on win7 64-bit.
And therefore the compiler should also work.

Title: Re: Code Blocks not building
Post by: Missinginaction on September 09, 2011, 02:55:13 am
in my case the 32 bit compiler doesn't work, so I am still looking for a solution.
Title: Re: Code Blocks not building
Post by: Perotto on September 10, 2011, 08:53:01 am
And I'm having the same problem.  :( I'm using Windows XP SP3 32-bit. I've installed Codeblocks 10.05 with MinGW.

When I try to run a program, nothing happens, and the build log is empty. But in my school Codeblocks 10.05 on the same operation system works properly. Maybe, I set up a wrong compiler or wrong settings?

Which compiler will work for my system and how to install it into the Codeblocks?
Title: Re: Code Blocks not building
Post by: stahta01 on September 10, 2011, 03:04:01 pm
@Missinginaction:

What is the name and version of the Compiler you installed?

What was the installation path of the Compiler you installed?

Tim S.

Title: Re: Code Blocks not building
Post by: gchow83 on March 27, 2012, 03:28:16 pm
I figured out why I was having problems with the compiler. minGW was installed in the same program file as C++ so you have to change the default file location go to

"Settings -> Compiler and debugger -> [your compiler] -> Toolchain executables"

then

under compiler instillation directory change the location to where you installed C++ the old one should look like

this ----> C:\minGW

the new one should look like

this -----> C:\Program Files\CodeBlocks\MinGW

couldn't find an answer to this problem so I posted.  ;D
Title: Re: Code Blocks not building
Post by: jukels on October 28, 2013, 07:30:25 am
Thanks for that tip. It definitely worked for me...

I figured out why I was having problems with the compiler. minGW was installed in the same program file as C++ so you have to change the default file location go to

"Settings -> Compiler and debugger -> [your compiler] -> Toolchain executables"

then

under compiler instillation directory change the location to where you installed C++ the old one should look like

this ----> C:\minGW

the new one should look like

this -----> C:\Program Files\CodeBlocks\MinGW

couldn't find an answer to this problem so I posted.  ;D
Title: Re: Code Blocks not building
Post by: cliffrad 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.
Title: Re: Code Blocks not building
Post by: oBFusCATed on October 05, 2017, 01:09:19 am
What? I guess you have trouble seeing a terminal...
Title: Re: Code Blocks not building
Post by: cliffrad 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
Title: Re: Code Blocks not building
Post by: BlueHazzard 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?
Title: Re: Code Blocks not building
Post by: cliffrad 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..
Title: Re: Code Blocks not building
Post by: stahta01 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.
Title: Re: Code Blocks not building
Post by: cliffrad 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))
 
Title: Re: Code Blocks not building
Post by: stahta01 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.
Title: Re: Code Blocks not building
Post by: cliffrad 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))



 
Title: Re: Code Blocks not building
Post by: stahta01 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 (http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)

Tim S.
Title: Re: Code Blocks not building
Post by: TimD on February 07, 2020, 02:02:40 pm
I had the same problem
All i had to do was check the Target X86(32 bit)[-m32] box under compiler settings
-settings/compiler and check  Target X86(32 bit)[-m32] box