title: "<project> - Debug" uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?
body: <p>I'm having trouble setting up CodeBlocks for a non-standard compiler. I've been struggling with it for 3 or 4 days now (on and off). I'm receiving the error:</p>
  
  <pre><code>"&lt;project&gt; - Debug" uses an invalid compiler. Probably the toolchain path
  within the compiler options is not setup correctly?!
  </code></pre>
  
  <p>I need to use the following settings when building this project. It integrates with the FIPS Capable OpenSSL Library. The FIPS Capable OpenSSL Library was built from sources and installed in <code>/usr/local/ssl</code>:</p>
  
  <pre><code>$ export CC=`find /usr/local/ssl -name fipsld`
  $ export FIPSLD_CC=`find /usr/bin -name g++`
  $ echo $CC
  /usr/local/ssl/fips-2.0/bin/fipsld
  $ echo $FIPSLD_CC
  /usr/bin/g++
  </code></pre>
  
  <p><code>fipsld</code> will compile <code>fips_premain.c</code> and perform some magic to ensure the module's signature is embedded in the resulting executable. If <code>fipsld</code> is not needed, then it simply invokes <code>CC</code> (hence the reason <code>FIPSLD_CC</code> needs to be set (also see Mike's comment on the circular dependency)).</p>
  
  <p>I've done this a thousand times from the command line with makefiles, so I know it works.</p>
  
  <p><strong>Environment</strong></p>
  
  <p>Under <strong>Settings -> Environment</strong>, I have the following:</p>
  
  <p><img src="https://i.stack.imgur.com/egshT.png" alt="CodeBlocks Environment"></p>
  
  <p><strong>Compiler and Debugger</strong></p>
  
  <p>Under <strong>Settings -> Compiler and Debugger</strong>, I have the following:</p>
  
  <p><img src="https://i.stack.imgur.com/bWeak.png" alt="CodeBlocks Program Files"></p>
  
  <p>And:</p>
  
  <p><img src="https://i.stack.imgur.com/aueyv.png" alt="CodeBlocks Additional Paths"></p>
  
  <p><strong>Project</strong></p>
  
  <p>The project uses the FIPSLD compiler:</p>
  
  <p><img src="https://i.stack.imgur.com/3uX5v.png" alt="CodeBlocks project compiler"></p>
  
  <p>But when I attempt to build, I get the following:</p>
  
  <p><img src="https://i.stack.imgur.com/79Ln6.png" alt="enter image description here"></p>
  
  <p>I've also tried setting the compiler to the full specified path of <code>/usr/local/ssl/fips-2.0/bin/fipsld</code>.</p>
  
  <p>(And I've closed/opened CodeBlocks too many times to count, and cleaned this project numerous times to try an re-read configuration settings).</p>
  
  <p><strong>Question</strong></p>
  
  <p>How do I set the compiler to <code>/usr/local/ssl/fips-2.0/bin/fipsld</code> in CodeBlocks?</p>
  
  <p>And related: I have <code>gdb-7.6.2</code> installed in <code>/usr/local/bin</code>. But CodeBlocks uses <code>gdb-7.4</code> that comes with Debian, even though I have the paths specified for the debugger, too (that's the <code>usr/local</code> path to <code>/usr/local/bin/gdb</code>). Any ideas what's wrong here?</p>
  
  <p>For completeness, this is not related to <a href="https://stackoverflow.com/questions/11170241/invalid-toolchain-error-with-codeblocks">Invalid toolchain error with Code::Blocks</a>. In this SO question the OP did not have a toolchain installed.</p>