国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

最后的準備,編譯 zendAPI

forsigner / 629人閱讀

摘要:操作系統我們假定是類操作系統,采用非源碼文件夾編譯。創建工作目錄獲取源碼您可以直接指定的分支,比如分支。到目前為止發布了一個版本。

操作系統我們假定是類 unix 操作系統,采用非源碼文件夾編譯。

創建工作目錄
cd ~/
mkdir workspace
cd workspace
mkdir build-zendapi
獲取源碼

您可以直接 clone 指定的分支,比如 master 分支。到目前為止 zendAPI 發布了一個版本 zapi-0.0.2-snapshot

git clone https://github.com/qcoreteam/zendapi.git zendapidevel
git checkout master
默認參數編譯

如果您的 PHP 安裝在標準路徑,可以用下面的命令進行編譯

cd build-zendapi
cmake ../zendapidevel

如果您想安裝到特定的路徑,可以使用下面的命名進行編譯

cd build-zendapi
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/zapi ../zendapidevel

如果您的 PHP 沒有安裝在標準路徑,假定您安裝在 /usr/local/php-7.1.5 目錄下,那么您可以使用下面的命令進行編譯

cd build-zendapi
cmake -DZAPI_OPT_PHP_ROOT_PATH=/usr/local/php-7.1.5 ../zendapidevel

如果您想給編譯器指定額外的選項參數,比如您想用 c++14 標準進行編譯,您可以使用下面的命令進行編譯

cd build-zendapi
cmake -DCMAKE_CXX_FLAGS="-std=c++14" ../zendapidevel

如果您想使用特定版本的編譯器進行編譯,比如我自己,我自己編譯了 clang 3.5, 按照路徑為 /usr/local/llvm-3.5/bin/clang++,這個路徑沒有在 PATH 環境變量里面,那么我們可以使用下面的命令進行編譯

cd build-zendapi
cmake -DCMAKE_C_COMPILER=/usr/local/llvm-3.5/bin/clang 
      -DCMAKE_CXX_COMPILER=/usr/local/llvm-3.5/bin/clang++ ../zendapidevel

現在我假定在我本機使用如下命令進行編譯, PHP 安裝在 /usr/local/php7/, 操作系統為 MacOS

cmake -DCMAKE_C_COMPILER=/usr/local/bin/gcc-6 
      -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-6 -DCMAKE_BUILD_TYPE=Debug ../zendapidevel

如果一切正常的話,您將看到如下的結果

-- --------------------------------------------------------------------------------------
-- Thank for using zendAPI project, have a lot of fun!
-- --------------------------------------------------------------------------------------
-- ZAPI_VERSION: 0.0.1-devel
-- PHP_INCLUDE_PATH: /usr/local/php7/include
-- PHP_LIB_PATH: /usr/local/php7/lib/libphp7.dylib
-- PHP_EXECUTABLE: /usr/local/php7/bin/php
-- PHP_CONFIG_EXECUABLE: /usr/local/php7/bin/php-config
-- CMAKE_BUILD_TYPE: Debug
-- CMAKE_BINARY_DIR: ~/workspace/build-zendapi
-- CMAKE_CURRENT_BINARY_DIR: ~/workspace/build-zendapi
-- CMAKE_SOURCE_DIR: ~/workspace/zendapidevel
-- PROJECT_BINARY_DIR: ~/workspace/build-zendapi
-- PROJECT_SOURCE_DIR: ~/workspace/zendapidevel
-- CMAKE_MODULE_PATH: ~/workspace/zendapidevel/cmake/modules
-- CMAKE_COMMAND: /usr/local/Cellar/cmake/3.7.2/bin/cmake
-- CMAKE_INSTALL_PREFIX: /usr/local
-- CMAKE_ROOT: /usr/local/Cellar/cmake/3.7.2/share/cmake
-- CMAKE_SYSTEM: Darwin-16.7.0
-- CMAKE_SYSTEM_NAME: Darwin
-- CMAKE_SYSTEM_VERSION: 16.7.0
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- CMAKE_SKIP_RPATH: NO
-- CMAKE_VERBOSE_MAKEFILE: FALSE
-- CMAKE_CXX_COMPILER: /usr/local/bin/g++-6
-- CMAKE_CXX_COMPILER_VERSION: 6.4.0
-- CMAKE_CXX_FLAGS: -Wa,-q -Wno-macro-redefined -Wno-deprecated-declarations
-- CMAKE_AR: /usr/bin/ar
-- CMAKE_RANLIB: /usr/bin/ranlib
-- --------------------------------------------------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: ~/workspace/build-zendapi

如果有錯誤,您可以根據具體的錯誤信息進行排查,如果不能解決,您可以到我們的 segmentfault 技術圈進行交流討論
如果沒有錯誤輸入一下命名進行編譯, -j 指定編譯進程數,根據 CPU 線程數定

make -j 8

如果整個編譯過程沒有錯誤的話,您將看到如下的輸出,如果有錯誤,麻煩您通知我們

[100%] Linking CXX shared library ../lib/libzapi.dylib
[100%] Built target zapi

最后輸入以下命令進行安裝

make install

安裝完成后您將看到如下輸出

Install the project...
-- Install configuration: "Debug"
-- Installing: /usr/local/lib/cmake/zendapi/ZendApiConfig.cmake
-- Installing: /usr/local/lib/cmake/zendapi/ZendApiConfigVersion.cmake
-- Installing: /usr/local/include/zapi
-- Installing: /usr/local/include/zapi/CompilerDetection.h
-- Installing: /usr/local/include/zapi/ds
-- Installing: /usr/local/include/zapi/ds/ArrayItemProxy.h
-- Installing: /usr/local/include/zapi/ds/ArrayVariant.h
-- Installing: /usr/local/include/zapi/ds/BoolVariant.h
-- Installing: /usr/local/include/zapi/ds/CallableVariant.h
-- Installing: /usr/local/include/zapi/ds/DoubleVariant.h
-- Installing: /usr/local/include/zapi/ds/internal
-- Installing: /usr/local/include/zapi/ds/internal/ArrayItemProxyPrivate.h
-- Installing: /usr/local/include/zapi/ds/internal/VariantPrivate.h
-- Installing: /usr/local/include/zapi/ds/NumericVariant.h
-- Installing: /usr/local/include/zapi/ds/ObjectVariant.h
-- Installing: /usr/local/include/zapi/ds/StringVariant.h
-- Installing: /usr/local/include/zapi/ds/Variant.h
-- Installing: /usr/local/include/zapi/Global.h
-- Installing: /usr/local/include/zapi/kernel
-- Installing: /usr/local/include/zapi/kernel/Exception.h
-- Installing: /usr/local/include/zapi/kernel/FatalError.h
-- Installing: /usr/local/include/zapi/kernel/Meta.h
-- Installing: /usr/local/include/zapi/kernel/NotImplemented.h
-- Installing: /usr/local/include/zapi/kernel/OrigException.h
-- Installing: /usr/local/include/zapi/kernel/StreamBuffer.h
-- Installing: /usr/local/include/zapi/lang
-- Installing: /usr/local/include/zapi/lang/Argument.h
-- Installing: /usr/local/include/zapi/lang/Class.h
-- Installing: /usr/local/include/zapi/lang/Constant.h
-- Installing: /usr/local/include/zapi/lang/Extension.h
-- Installing: /usr/local/include/zapi/lang/Function.h
-- Installing: /usr/local/include/zapi/lang/Ini.h
-- Installing: /usr/local/include/zapi/lang/Interface.h
-- Installing: /usr/local/include/zapi/lang/internal
-- Installing: /usr/local/include/zapi/lang/internal/ExtensionPrivate.h
-- Installing: /usr/local/include/zapi/lang/internal/NamespacePrivate.h
-- Installing: /usr/local/include/zapi/lang/internal/StdClassPrivate.h
-- Installing: /usr/local/include/zapi/lang/Method.h
-- Installing: /usr/local/include/zapi/lang/Namespace.h
-- Installing: /usr/local/include/zapi/lang/Parameters.h
-- Installing: /usr/local/include/zapi/lang/StdClass.h
-- Installing: /usr/local/include/zapi/lang/Type.h
-- Installing: /usr/local/include/zapi/PhpHeaders.h
-- Installing: /usr/local/include/zapi/ProcessorDetection.h
-- Installing: /usr/local/include/zapi/protocol
-- Installing: /usr/local/include/zapi/protocol/AbstractIterator.h
-- Installing: /usr/local/include/zapi/protocol/ArrayAccess.h
-- Installing: /usr/local/include/zapi/protocol/Countable.h
-- Installing: /usr/local/include/zapi/protocol/Interfaces.h
-- Installing: /usr/local/include/zapi/protocol/Serializable.h
-- Installing: /usr/local/include/zapi/protocol/Traversable.h
-- Installing: /usr/local/include/zapi/stdext
-- Installing: /usr/local/include/zapi/stdext/Functional.h
-- Installing: /usr/local/include/zapi/stdext/internal
-- Installing: /usr/local/include/zapi/stdext/internal/FunctionalPrivate.h
-- Installing: /usr/local/include/zapi/stdext/internal/TuplePrivate.h
-- Installing: /usr/local/include/zapi/stdext/Tuple.h
-- Installing: /usr/local/include/zapi/stdext/TypeTraits.h
-- Installing: /usr/local/include/zapi/SystemDetection.h
-- Installing: /usr/local/include/zapi/Typedefs.h
-- Installing: /usr/local/include/zapi/utils
-- Installing: /usr/local/include/zapi/utils/CommonFuncs.h
-- Installing: /usr/local/include/zapi/utils/PhpFuncs.h
-- Installing: /usr/local/include/zapi/Version.h.in
-- Installing: /usr/local/include/zapi/vm
-- Installing: /usr/local/include/zapi/vm/AbstractClass.h
-- Installing: /usr/local/include/zapi/vm/AbstractMember.h
-- Installing: /usr/local/include/zapi/vm/BoolMember.h
-- Installing: /usr/local/include/zapi/vm/Callable.h
-- Installing: /usr/local/include/zapi/vm/Closure.h
-- Installing: /usr/local/include/zapi/vm/Engine.h
-- Installing: /usr/local/include/zapi/vm/ExecStateGuard.h
-- Installing: /usr/local/include/zapi/vm/FloatMember.h
-- Installing: /usr/local/include/zapi/vm/internal
-- Installing: /usr/local/include/zapi/vm/internal/AbstractClassPrivate.h
-- Installing: /usr/local/include/zapi/vm/internal/AbstractMemberPrivate.h
-- Installing: /usr/local/include/zapi/vm/internal/CallablePrivate.h
-- Installing: /usr/local/include/zapi/vm/InvokeBridge.h
-- Installing: /usr/local/include/zapi/vm/IteratorBridge.h
-- Installing: /usr/local/include/zapi/vm/NullMember.h
-- Installing: /usr/local/include/zapi/vm/NumericMember.h
-- Installing: /usr/local/include/zapi/vm/ObjectBinder.h
-- Installing: /usr/local/include/zapi/vm/Property.h
-- Installing: /usr/local/include/zapi/vm/StringMember.h
-- Installing: /usr/local/include/zapi/vm/ZValMember.h
-- Installing: /usr/local/include/zapi/ZendApi.h
-- Installing: /usr/local/lib/libzapi.0.0.1.dylib
-- Installing: /usr/local/lib/libzapi.0.dylib
-- Installing: /usr/local/lib/libzapi.dylib
-- Installing: /usr/local/lib/cmake/zendapi/ZendApiTargets.cmake
-- Installing: /usr/local/lib/cmake/zendapi/ZendApiTargets-debug.cmake

到此我們整個安裝過程就結束了, Have a lot of fun。

文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。

轉載請注明本文地址:http://m.specialneedsforspecialkids.com/yun/25886.html

相關文章

  • hello zapi 項目準備工作-CPP開發PHP之旅第一節

    摘要:原文地址在新手學堂里面,我們將從零基于開發一個簡單的擴展,這個擴展的名字叫做現在我們著手準備開發需要的環境吧。 原文地址: http://www.zendapi.org/manual... 在新手學堂里面,我們將從零基于 zendAPI 開發一個簡單的 PHP 擴展,這個擴展的名字叫做 hellozapi , 現在我們著手準備開發需要的環境吧。 demo 的項目庫地址 https://...

    khs1994 評論0 收藏0
  • hellozapi項目CMake編譯腳本詳解-CPP開發PHP之旅第二節

    摘要:項目編譯腳本整體代碼編譯腳本逐行解說我們推薦的版本是這里如果您的版本低于的話,會報錯。這里我們定義我們的項目名稱為使用的編程語言為。這行代碼的意思就是指示編譯器使用的標準對代碼進行編譯。在項目中我們主要有三個文件,在這里進行添加。 原文鏈接:http://www.zendapi.org/manual... 因為 zendAPI 采用的是 CMake 進行編譯,所以我們的 helloza...

    Kerr1Gan 評論0 收藏0
  • zendAPI CMake 參數詳解

    摘要:類型字符串默認值無描述這個變量的值將會傳遞給編譯器比如等等參數。類型字符串默認值無描述參考當可執行文件在非主流的路徑下的時候可以指定這個變量,幫助編譯系統進行探測。 zendAPI 是采用 CMake 進行編譯的,我們在項目中定義了一些 CMake 的函數,變量和選項,下面我們在這篇文章中對這些進行詳細的說明,有助于節省大家的時間。 CMake 內置重要變量 CMAKE_INSTALL...

    walterrwu 評論0 收藏0
  • zendAPI 依賴環境詳細說明

    操作系統 部署操作系統只支持 Linux (只支持64位系統)開發環境目前支持 MacOs 和 Linux (只支持64位系統) 目前在如下系統上 zendAPI 編譯通過:(X86_64) MacOS 10.12.6 (開發) openSUSE 42.2 (部署和開發) Ubuntu 16.04 (部署和開發) CentOS 7 (部署) 暫時沒來的及測試的有 (X86_64) Deepi...

    silvertheo 評論0 收藏0
  • zendAPI 開發環境構建

    摘要:操作系統對于開發友好的操作系統,我們首先推薦操作系統,首先是環境對開發者非常友好,另外是圖形界面非常穩定。平臺編譯選項平臺編譯選項 操作系統 對于開發友好的操作系統,我們首先推薦 MacOS 操作系統,首先 MacOS 是 Unix 環境對開發者非常友好,另外是圖形界面非常穩定。其次如果想用 GNU/Linux 操作系統作為開發環境,推薦使用最新版的 openSUSE/Ubuntu/d...

    mengbo 評論0 收藏0

發表評論

0條評論

最新活動
閱讀需要支付1元查看
<