captain-chengzi opened a new issue, #40880:
URL: https://github.com/apache/arrow/issues/40880
### Describe the bug, including details regarding any error messages,
version, and platform.
#include "arrow/io/file.h"
#include "parquet/stream_reader.h"
int main() {
std::shared_ptr<arrow::io::ReadableFile> infile;
PARQUET_ASSIGN_OR_THROW(infile,
arrow::io::ReadableFile::Open("/home/nick/workspace/nick/cpp/part.0.parquet",
arrow::default_memory_pool()));
parquet::StreamReader stream {parquet::ParquetFileReader::Open(infile)};
return 0;
}
cmakelists:
cmake_minimum_required(VERSION 3.16)
project(test)
find_package(Arrow REQUIRED)
find_package(Parquet REQUIRED)
set(CMAKE_CXX_STANDARD 20)
add_executable(test1 test.cpp)
target_link_libraries(test1 arrow parquet)
I had installed arrow/parquet 15.0.0.0 in /usr/lib64, but when i try build
this program, it err reported:
CMakeFiles/test1.dir/test.cpp.o: In function `main':
test.cpp:(.text+0x77): undefined reference to
`arrow::io::ReadableFile::Open(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, arrow::MemoryPool*)'
test.cpp:(.text+0x246): undefined reference to
`parquet::StreamReader::operator>>(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >&)'
CMakeFiles/test1.dir/test.cpp.o: In function
`parquet::ParquetStatusException::ParquetStatusException(arrow::Status)':
test.cpp:(.text._ZN7parquet22ParquetStatusExceptionC2EN5arrow6StatusE[_ZN7parquet22ParquetStatusExceptionC5EN5arrow6StatusE]+0x24):
undefined reference to `arrow::Status::ToString[abi:cxx11]() const'
collect2: error: ld returned 1 exit status
make[2]: *** [test1] Error 1
make[1]: *** [CMakeFiles/test1.dir/all] Error 2
make: *** [all] Error 2

Hope to receive help
### Component(s)
C++
--
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]