Skip to content

Extra flags needed for build #2

@drewhemm

Description

@drewhemm

I had to add a couple of extra flags to the build in order to get it to work:

$ c++ -I . -o hdrdmacp *.cc -libverbs -lz -pthread

The -I . was needed to explicitly set the working directory as the include path, otherwise I would get this error:

$ c++ -o hdrdmacp *.cc -libverbs -lz
hdRDMA.cc:2:10: fatal error: hdRDMA.h: No such file or directory
 #include <hdRDMA.h>
          ^~~~~~~~~~
compilation terminated.
hdrdmacp.cc:5:10: fatal error: hdRDMA.h: No such file or directory
 #include <hdRDMA.h>
          ^~~~~~~~~~
compilation terminated.
In file included from hdRDMAThread.cc:12:
hdRDMA.h:19:10: fatal error: hdRDMAThread.h: No such file or directory
 #include <hdRDMAThread.h>
          ^~~~~~~~~~~~~~

And the -pthread was needed for cross-platform building I believe:

c++ -I . -o hdrdmacp *.cc -libverbs -lz
/usr/bin/ld: /tmp/ccH1rQ0c.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/usr/bin/ld: //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

With those two additions, I was able to build successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions