2009-08-06 4 views
1

저는 SCons를 빌드 시스템으로 사용하는 프로젝트를 컴파일하기 위해 MinGW 기반 GCC 크로스 컴파일러를 사용하고 있습니다.SCons : GCC Ignoring -c

Python은 MinGW (또는 Cygwin) 용으로 특별히 컴파일되지 않은 기본 2.6.2 버전입니다.

그러나, 나는 빌드 문제로 실행하고 있습니다 : 나는 CFLAGS에 -c를 추가 경우

F:/pedigree/compilers/bin/i686-elf-gcc -o build\src\user\applications\apptest\ma 
in.obj -c -std=gnu99 -march=i486 -fno-builtin -m32 -g0 -O3 -Wno-long-long -Wnest 
ed-externs -Wall -Wextra -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-long- 
long -Wno-variadic-macros -Wno-unused -Wno-unused-variable -Wno-conversion -Wno- 
format -Wno-empty-body -fno-stack-protector -DTHREADS -DDEBUGGER -DDEBUGGER_QWER 
TY -DSERIAL_IS_FILE -DECHO_CONSOLE_TO_SERIAL -DKERNEL_NEEDS_ADDRESS_SPACE_SWITCH 
-DADDITIONAL_CHECKS -DBITS_32 -DKERNEL_STANDALONE -DVERBOSE_LINKER -DX86 -DX86_ 
COMMON -DLITTLE_ENDIAN -D__UD_STANDALONE__ -DINSTALLER -Isrc\subsys\posix\includ 
e -Ibuild\src\user\applications\apptest -Isrc\user\applications\apptest src\user 
\applications\apptest\main.c 
f:/pedigree/compilers/bin/../lib/gcc/i686-elf/4.4.1/../../../../i686-elf/bin/ld. 
exe: crt0.o: No such file: No such file or directory 

, 나는라는 컴파일 된 객체는 "main.obj -c는"(A 거기 도착 obj와 -c 사이의 공백).

어떤 일이 일어나는 지 아는 사람이 있습니까? 이 문제를 해결하기 위해 할 수있는 일이 있습니까? 그것은 백 슬래시를 탈출 할 때

def escape(arg): 
    "escape shell special characters" 
    slash = '\\' 
    special = '"$()' 

    arg = string.replace(arg, slash, slash+slash) 
    for c in special: 
     arg = string.replace(arg, c, slash+c) 

    return '"' + arg + '"' 

, 그것은 윈도우에서 혼란을 낸다 :

답변

2

이 프로젝트는 progarm 및 오브젝트 파일 확장자를 시행 할 수있는 POSIX 플랫폼, SCons는에 그러나 POSIX 플랫폼 기능 "탈출"정의를 사용 환경. 중립 플랫폼으로 변경하고 확장을 명시 적으로 지정하면 문제가 해결됩니다.