从大型C ++库导入

时间:2017-06-12 23:10:11

标签: c++ c++11 linker parquet

  1. 我正在尝试使用以下库:https://github.com/apache/parquet-cpp。一旦构建,库就会生成许多共享对象(libparquet.so,libarrow.so,libsnappy.so等)。在这种情况下,在我自己的单个源文件中使用这个库,我将不得不在Makefile中使用多个-I / -L语句,可能指向特定的位置。有更短,更简单,更有效的方式吗?

  2. 目前运行提供的示例:reader-writer.cc时,我正在将此项目外的文件复制到一个新文件夹中,并将其重命名为test.cpp。然后我复制此目录中的libarrow / libparquet.so文件并运行此处所述的命令。编译器成功运行,但链接器因以下日志而失败。

  3.   

    /tmp/ccBbmmG9.o:在函数<!doctype html> <html> <head></head> <body class="tc-body"> <script> global.$tw = global.require("./boot/bootprefix.js").bootprefix(); global.$tw.boot.argv = ['./editions/server']; global.$tw = require("./boot/boot.js").TiddlyWiki(global.$tw); </script> </body> </html> parquet :: TypedColumnWriter&gt; :: WriteBatch(long,short const *,short const *,bool const *)'   test.cpp :(。text + 0xcb6):未定义引用main': test.cpp:(.text+0xc4d): undefined reference to parquet :: TypedColumnWriter&gt; :: WriteBatch(long,short const *,short const *,long const *)'   test.cpp :(。text + 0xdf7):未定义引用parquet::TypedColumnWriter<parquet::DataType<(parquet::Type::type)1> >::WriteBatch(long, short const*, short const*, int const*)' test.cpp:(.text+0xd6d): undefined reference to parquet :: TypedColumnWriter&gt; :: WriteBatch(long,short const *,short const *,float const *)'   test.cpp :(。text + 0xef1):未定义引用parquet::TypedColumnWriter<parquet::DataType<(parquet::Type::type)3> >::WriteBatch(long, short const*, short const*, parquet::Int96 const*)' test.cpp:(.text+0xe74): undefined reference to parquet :: TypedColumnWriter&gt; :: WriteBatch(long,short const *,short const *,parquet :: ByteArray const *)'   test.cpp :(。text + 0x1065):未定义引用parquet::TypedColumnWriter<parquet::DataType<(parquet::Type::type)5> >::WriteBatch(long, short const*, short const*, double const*)' test.cpp:(.text+0x1034): undefined reference to parquet :: TypedColumnWriter&gt; :: WriteBatch(long,short const *,short const *,parquet :: FixedLenByteArray const *)'   test.cpp :(。text + 0x146f):未定义引用parquet::TypedColumnWriter<parquet::DataType<(parquet::Type::type)6> >::WriteBatch(long, short const*, short const*, parquet::ByteArray const*)' test.cpp:(.text+0x1153): undefined reference to parquet :: TypedColumnReader&gt; :: ReadBatch(long,short *,short *,int *,long *)'   test.cpp :(。text + 0x1702):未定义引用parquet::TypedColumnReader<parquet::DataType<(parquet::Type::type)0> >::ReadBatch(long, short*, short*, bool*, long*)' test.cpp:(.text+0x15c1): undefined reference to parquet :: TypedColumnReader&gt; :: ReadBatch(long,short *,short *,parquet :: Int96 *,long *)'   test.cpp :(。text + 0x1a5a):未定义引用parquet::TypedColumnReader<parquet::DataType<(parquet::Type::type)2> >::ReadBatch(long, short*, short*, long*, long*)' test.cpp:(.text+0x18c3): undefined reference to parquet :: TypedColumnReader&gt; :: ReadBatch(long,short *,short *,double *,long *)'   test.cpp :(。text + 0x1d3f):未定义引用parquet::TypedColumnReader<parquet::DataType<(parquet::Type::type)4> >::ReadBatch(long, short*, short*, float*, long*)' test.cpp:(.text+0x1bc3): undefined reference to parquet :: TypedColumnReader&gt; :: ReadBatch(long,short *,short *,parquet :: FixedLenByteArray *,long *)'   collect2:错误:ld返回1退出状态

0 个答案:

没有答案