Author Topic: beginner - problem at the first programm  (Read 2647 times)

elodouwen

  • Guest
beginner - problem at the first programm
« on: April 06, 2015, 04:52:29 pm »
hi
i launched code::blocks
i made "new project, console application, C"
i choose a path, i left release and debug on and " Gnu Gcc Compiler"
i opened "main.c" that contains by default :
Code
#include <stdio.h>
#include <stdlib.h>
int main()
{
    printf("Hello world!\n");
    return 0;
}
i clicked "build and run"
result :
in bluid/log i tells :
Quote
-------------- Build: Debug in Adrien_4 (compiler: GNU GCC Compiler)---------------

gcc -Wall -g -I/Developer/SDKs/MacOSX10.6.sdk/usr/include -I/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1 -c "/Users/vincentdouce/)tout/Informatique/C/Programmes/Adrien_4/main.c" -o obj/Debug/main.o
g++ -L/Developer/SDKs/MacOSX10.6.sdk/usr/lib -L/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1 -o bin/Debug/Adrien_4 obj/Debug/main.o
ld: warning: directory not found for option '-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib'
ld: warning: directory not found for option '-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1'
Output file is bin/Debug/Adrien_4 with size 8.54 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 2 warning(s) (0 minute(s), 0 second(s))


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

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

in build/messages it tells :
Quote
||=== Build: Debug in Adrien_4 (compiler: GNU GCC Compiler) ===|
||warning: directory not found for option '-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib'|
||warning: directory not found for option '-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1'|
||=== Build finished: 0 error(s), 2 warning(s) (0 minute(s), 0 second(s)) ===|
||=== Run: Debug in Adrien_4 (compiler: GNU GCC Compiler) ===|

and the execution opens automaticcaly a terminal windows that says :
Quote
~ vincentdouce$ /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/aaaa/Adrien_4/bin/Debug/Adrien_4
-bash: syntax error near unexpected token `)'

i tried to find the folder in the terminal and to make :
Code
gcc main.c
and this seems to work, i mean this gives no error message.

some people on dev.net french forum said to me :
Quote
it comes from the script cb_console_runner (/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner)
or from the environment variable DYLD_LIBRARY_PATH

i mean, i just installed a new 13.12 Code::blocks, and made the manipulation i describe here. i did not do anything else

must i understand this as a conflit between codeblocks and other C installations ?

my aim is, for teaching reasons, to be able to write C programms inside Codeblocks sometimes, inside Xcode sometimes, inside aquamacsterminal some other times

does such a triple use of C have the reputation to create conflicts ?

Vinz