jasinliu commented on PR #628:
URL: 
https://github.com/apache/incubator-graphar/pull/628#issuecomment-2357643930

   There is a problem. After installing graphar in the system using this 
method, if you then install arrow in the system and then rely on both arrow and 
graphar in a program, the compilation will throw an error about multiple 
definitions.
   
   ### install graphar
   ```bash
   cmake .. -DBUILD_ARROW_FROM_SOURCE=ON -DGRAPHAR_BUILD_STATIC=ON
   make -j && sudo make install
   ```
   ### install arrow
   ```bash
   cmake ..  -DARROW_PARQUET=ON -DARROW_CSV=ON -DARROW_JSON=ON  -DARROW_ORC=ON 
-DARROW_DATASET=ON -DARROW_BUILD_SHARED=OFF -DARROW_DEPENDENCY_USE_SHARED=OFF
   sudo make install
   ```
   
   ### show.cc
   ```c++
   #include "graphar/graph_info.h"
   #include "iostream"
   #include "arrow/api.h"
   
   
   int main() {
       std::string path = 
"/workspaces/incubator-graphar/testing/neo4j/MovieGraph.graph.yml";
       auto graph_info = graphar::GraphInfo::Load(path);
       std::cout << graph_info.value()->Dump().value() << std::endl;
       arrow::Int8Builder int8builder;
   }
   ```
   ### CMakeLists.txt
   ```cmake
   cmake_minimum_required(VERSION 3.15)
   
   project(show)
   
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall")
   
   set(TARGET show)
   
   find_package(OpenSSL REQUIRED)
   find_package(graphar REQUIRED)
   find_package(Arrow REQUIRED)
   
   add_executable(${TARGET} show.cc)
   target_link_libraries(${TARGET} PRIVATE graphar Arrow::arrow_static)
   ```
   
   ### build show
   ```bash
   cmake .. && make
   ```
   
![image](https://github.com/user-attachments/assets/e625de9b-3545-456b-b63b-d1b64e6c07a6)
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to