That works!

Thank you,
-Joris.

On Fri, 31 Aug 2018, 19:50 Wes McKinney, <[email protected]> wrote:

> hi Joris,
>
> The conda-forge libraries are currently built with compatibility for
> gcc version 4.8 and higher, which means using the old CXX ABI. So you
> have two options:
>
> * Build the Arrow libraries from source on your compiler
> * Pass -D_GLIBCXX_USE_CXX11_ABI=0 to gcc when compiling all object
> code with direct or indirect linkage (e.g. an std::string created
> someplace else will be ABI-incompatible) to conda-forge binaries
>
> - Wes
> On Fri, Aug 31, 2018 at 2:13 PM Joris Peeters
> <[email protected]> wrote:
> >
> > I am trying to compile a small piece of C++ code, linking against the
> arrow
> > libraries which I retrieved through Anaconda (conda install -c
> conda-forge
> > arrow-cpp).
> >
> > The minified code for test.cpp looks like this,
> >
> > >>
> > #include <arrow/status.h>
> > #include <iostream>
> >
> > void checkStatus(arrow::Status const &status) {
> >   if (!status.ok()) {
> >     std::cout << status.ToString() << std::endl;
> >   }
> > }
> > <<
> >
> > and the build command looks like (conda/build is a local anaconda env
> with
> > the necessary libs),
> >
> > g++ test.cpp -Iconda/build/include -Lconda/build/lib -lboost_system
> > -lboost_filesystem -larrow
> >
> > This gives the following error,
> >
> > >>
> > /usr/lib/gcc/x86_64-redhat-linux/7/../../../../lib64/crt1.o: In function
> > `_start':
> > (.text+0x20): undefined reference to `main'
> > /tmp/ccXSAIRl.o: In function `checkStatus(arrow::Status const&)':
> > test.cpp:(.text+0x2f): undefined reference to
> > `arrow::Status::ToString[abi:cxx11]() const'
> > collect2: error: ld returned 1 exit status
> > <<
> >
> > Is this something that rings a bell to someone? I've tried a bunch of
> > things, but can't immediately see what the issue is. I'm using G++ 7.3.1
> on
> > Fedora 26.
> >
> > It's likely I'm just doing this completely wrong, though, so any pointers
> > to get me on the right path would be very helpful!
> >
> > Thanks,
> > -J
>

Reply via email to