简体   繁体   中英

code blocks does not compile on mac OSX

I have been trying to run code blocks on my mac (10.7.5) and have hit a wall. I've researched many other threads with people that have had similar problems, but still not able to figure it out. I'm sure its something simple that I'm missing.

  1. downloaded the mac version of codeblocks from codeblocks.org
  2. I've installed Xcode from the app store
  3. installed the additional developer tools from the apple developer site

when i run a simple program like:

#include <stdio.h>

int main(){
    printf("hello dudes");
    return 0;
}

the output just says hello world, I know this works, I paste the program into codepad.org and it outputs fine. the color highlighting in code blocks doesn't seem to work either. just black text and no colors for variables and functions.

I'm not sure what I'm missing, I've also tried to set the default compiler to:

  1. GNU CC
  2. LLVM Clang

This is how you can debug the issue. You can add -v flags to both the compilation and the linking in code blocks. This can be done in three places in code blocks, settings->compiler, project settings or build settings.

I ran into a similar issue with compiler problems and solved it through -v debugging. Heres a link to the issue, C++11 compilation issues in codeblocks , and the solution. Hopefully that will help walk you through a solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM