0
  1. I am trying to work with the following library: https://github.com/apache/parquet-cpp. Once built, the library has a number of shared objects generated(libparquet.so,libarrow.so,libsnappy.so,etc). In such a situation to work with this library in my own single source file, I would have to use multiple -I/-L statements in a Makefile probably pointing to specific locations. Is there a shorter, simpler and more efficient way?

  2. Currently when running the example provided: reader-writer.cc, I'm copying the file outside this project in a new folder renaming it to test.cpp. Then I copy the libarrow/libparquet.so files in this directory and run the command as explained here. The compiler runs successfully, but the linker fails with the following log.

/tmp/ccBbmmG9.o: In function main': test.cpp:(.text+0xc4d): undefined reference toparquet::TypedColumnWriter >::WriteBatch(long, short const*, short const*, bool const*)' test.cpp:(.text+0xcb6): undefined reference to parquet::TypedColumnWriter<parquet::DataType<(parquet::Type::type)1> >::WriteBatch(long, short const*, short const*, int const*)' test.cpp:(.text+0xd6d): undefined reference toparquet::TypedColumnWriter >::WriteBatch(long, short const*, short const*, long const*)' test.cpp:(.text+0xdf7): undefined reference to parquet::TypedColumnWriter<parquet::DataType<(parquet::Type::type)3> >::WriteBatch(long, short const*, short const*, parquet::Int96 const*)' test.cpp:(.text+0xe74): undefined reference toparquet::TypedColumnWriter >::WriteBatch(long, short const*, short const*, float const*)' test.cpp:(.text+0xef1): undefined reference to parquet::TypedColumnWriter<parquet::DataType<(parquet::Type::type)5> >::WriteBatch(long, short const*, short const*, double const*)' test.cpp:(.text+0x1034): undefined reference toparquet::TypedColumnWriter >::WriteBatch(long, short const*, short const*, parquet::ByteArray const*)' test.cpp:(.text+0x1065): undefined reference to parquet::TypedColumnWriter<parquet::DataType<(parquet::Type::type)6> >::WriteBatch(long, short const*, short const*, parquet::ByteArray const*)' test.cpp:(.text+0x1153): undefined reference toparquet::TypedColumnWriter >::WriteBatch(long, short const*, short const*, parquet::FixedLenByteArray const*)' test.cpp:(.text+0x146f): undefined reference to parquet::TypedColumnReader<parquet::DataType<(parquet::Type::type)0> >::ReadBatch(long, short*, short*, bool*, long*)' test.cpp:(.text+0x15c1): undefined reference toparquet::TypedColumnReader >::ReadBatch(long, short*, short*, int*, long*)' test.cpp:(.text+0x1702): undefined reference to parquet::TypedColumnReader<parquet::DataType<(parquet::Type::type)2> >::ReadBatch(long, short*, short*, long*, long*)' test.cpp:(.text+0x18c3): undefined reference toparquet::TypedColumnReader >::ReadBatch(long, short*, short*, parquet::Int96*, long*)' test.cpp:(.text+0x1a5a): undefined reference to parquet::TypedColumnReader<parquet::DataType<(parquet::Type::type)4> >::ReadBatch(long, short*, short*, float*, long*)' test.cpp:(.text+0x1bc3): undefined reference toparquet::TypedColumnReader >::ReadBatch(long, short*, short*, double*, long*)' test.cpp:(.text+0x1d3f): undefined reference to parquet::TypedColumnReader<parquet::DataType<(parquet::Type::type)6> >::ReadBatch(long, short*, short*, parquet::ByteArray*, long*)' test.cpp:(.text+0x1fe7): undefined reference toparquet::TypedColumnReader >::ReadBatch(long, short*, short*, parquet::FixedLenByteArray*, long*)' collect2: error: ld returned 1 exit status

tangy
  • 3,056
  • 2
  • 25
  • 42

0 Answers0