2016-06-02 3 views
0

길이가 긴 C 및 CPP 코드 파일이 거의없고 그 안에 함수 이름을 가져 오려고합니다. Windows에서 cproto를 사용하는 방법

나는 내 Windows 7 시스템에 cproto-4.7c-bin.zip을 다운로드하여 명령 프롬프트에 다음을 시도 :

C:\Users\admin\Desktop\cproto-4.7c-bin\bin>cproto -f fileExec.c 
/* stdin */ 

아무 일도 있습니다. 교수형에 처한 것처럼 보입니다. 명령 프롬프트 창을 닫을 때까지 /* stdin */을 표시합니다 (효과적으로 종료). trace.out 파일이 C:\Users\admin\Desktop\cproto-4.7c-bin\bin에 비어 있습니다.

+2

왜이 질문이 보류 중인지 잘 모르겠지만 ... 무엇이 묻히고 있는지, 나는 그 질문에 대답했습니다. 이 질문을하는 방식이 개선되는 것을 보길 원하는 사람이 정확히 무엇입니까? – rkersh

답변

0

/* stdin */ 메시지는 stdin에서 입력을 기다리는 중입니다.

처음에는 원래는 찾았지만 현재는 없어진 프로젝트 here입니다. 질문에 언급 된 새로운 버전이 괜찮은 문서로 보입니다. 당신이 cproto --help을 실행하면 다음과 같은 사용법 문장을 출력 :

 
cproto: invalid option -- '-' 
usage: cproto [ option ... ] [ file ... ] 
Options: 
    -a, -t   Convert function definitions to ANSI or traditional style 
    -b    Rewrite function definitions in both styles 
    -c    Enable comments in prototype parameters 
    -e    Output "extern" keyword before global declarations 
    -f n    Set function prototype style (0 to 3) 
    -l    Generate output in lint-library style 
    -o file   Redirect output to file 
    -O file   Redirect errors to file 
    -p    Disable formal parameter promotion 
    -q    Disable include file read failure messages 
    -s    Output static declarations also 
    -S    Output static declarations only 
    -T    Output type definitions 
    -v    Output variable declarations 
    -x    Output variables and functions declared "extern" 
    -m    Put macro around prototype parameters 
    -M name   Set name of prototype macro 
    -d    Omit prototype macro definition 
    -P template  Set prototype format template " int f (a, b)" 
    -F template  Set function definition format template " int f (a, b)" 
    -C template  Set format for function definition with parameter comments 
    -D name[=value] Define C preprocessor symbol 
    -U name   Undefine C preprocessor symbol 
    -I directory  Add #include search directory 
    -E command  Run specified C preprocessor command 
    -E 0    Do not run any C preprocessor 
    -V    Print version information 

당신은 -f 옵션 추가 인수를 제공 (또는 간단히 제거)해야합니다.
C : \ 사용자 \ 관리자 \ 바탕 화면 \ cproto-4.7c - 빈 \ 빈> cproto -f3 fileExec.c
또는
C : \ 사용자 \ 관리자 \ 바탕 화면 \의 cproto-4.7c 예를 들어 -bin \ bin> cproto fileExec.c

+0

안녕하세요 rkersh, 위의 옵션을 시도했다. 오류가 발생했습니다 : 'gcc'가 내부 또는 외부 명령으로 작동 가능 프로그램 또는 배치 파일 으로 인식되지 않습니다. 새로운 문제를 검색 중입니다 .. 나가는 법을 알고 있는지 알려주세요. – priya

+0

실행중인 정확한 명령은 무엇이며 정확한 결과는 무엇입니까? 그것은 당신이 뭔가를 컴파일하려고하는 것 같군 .... – rkersh

+0

실제로 메신저 C, C++에서 새롭고 우리가 함수/메소드를 선언 할 필요가있는이 프로젝트에 할당되었다. 각 .c, .cpp 파일에 다음과 같이 구현된다. 이름 바꾸기/바꾸기. Windows에서 cproto에 gcc가 필요한 이유를 모르겠습니다. 실행중인 명령 : C : \ Users \ admin \ Desktop \ cproto-4.7c-bin \ bin> cproto -f fileExec.c – priya

관련 문제