Author Topic: unable to compile Console application  (Read 5060 times)

Offline cplus101

  • Single posting newcomer
  • *
  • Posts: 2
unable to compile Console application
« on: February 07, 2012, 05:59:32 am »
Hi
 
   I just installed codeblock and created a console application.  When I hit <Build & Run>, I got this error,

"sample1 - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...

Nothing to be done.

   Pls help, thank you.


Regards,


Cplus101

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: unable to compile Console application
« Reply #1 on: February 07, 2012, 06:11:33 am »
See below:
YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline cplus101

  • Single posting newcomer
  • *
  • Posts: 2
Re: unable to compile Console application
« Reply #2 on: February 07, 2012, 07:01:48 am »
Hi,

   Thanks any way.  I resolved it: 

    1) go to Setting -> Compiler and Debugger

    2) select <Toolchain Executable> tab

    3) Change compiler's Installation Directory

        I installed my codeblock at "C:\Program Files\CodeBlocks\MinGW"

        NOTE:  you need to know where MinGW was installed.

      It works!


       

ctrl_xvc

  • Guest
Re: unable to compile Console application
« Reply #3 on: September 23, 2012, 05:38:29 pm »
nice one
 ::)
work for me thx