2014-06-18 2 views
2

OSX에서 플랫 버퍼를 만들려고하는데 정확히 어떻게 진행해야할지 모르겠습니다. the doc에 따르면. 나는 cmake -G "Xcode"을 실행해야합니다. 나는 그것을했고, 그 결과 가지고 : OSX에서 플랫 버퍼를 만드는 방법은 무엇입니까?

-- The C compiler identification is Clang 5.1.0 
-- The CXX compiler identification is Clang 5.1.0 
-- Check for working C compiler using: Xcode 
-- Check for working C compiler using: Xcode -- works 
-- Detecting C compiler ABI info 
-- Detecting C compiler ABI info - done 
-- Check for working CXX compiler using: Xcode 
-- Check for working CXX compiler using: Xcode -- works 
-- Detecting CXX compiler ABI info 
-- Detecting CXX compiler ABI info - done 
-- Configuring done 
-- Generating done 
-- Build files have been written to: Temp/flatbuffers 

그러나 거기에서 내가 할 모르겠어요합니다. make을 실행하려했지만 오류 메시지 make: *** No targets specified and no makefile found. Stop.이 있습니다. 어떤 아이디어로 그것을 구축 할 수 있습니까?

답변

6

cmake를 실행하면 Xcode IDE 프로젝트 (Apple App Store에서 다운로드 가능)가 생성되었습니다. 당신이 만드는 사용하여 구축하려는 경우

, 대신 다음 명령을 사용합니다 그 후

cmake -G"Unix Makefiles" 

, 의도 한대로 make 작동합니다.

10

대신 make, 그냥 쉘에서 다음 명령을 실행

$ cmakexbuild

을 당신이 ./Debug 폴더에 flatc을 얻을 것이다 마친 후.

2

OSX에서는 Homebrew를 사용하여 flatbuffer 스키마 컴파일러를 설치하는 것이 좋습니다.

brew install flatbuffers 

사용법 : Using the schema compiler

1

가 사용 flatbuffer 코드

관련 문제