[dpdk-dev] Object Oriented DPDK: c++ class

Hamid Ramazani mrramazani at gmail.com
Thu Jan 2 17:51:06 CET 2014


Hi,

Anyone has written an object oriented DPDK application?

I've written a simple helloClass program, and I've created the object
file by following Makefile:
helloClass.o : helloClass.cpp
        g++ -c  helloClass.cpp
-I/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include

but I've problem in linking stage. I've tried many ways but I get the errors:
undefined reference to...
and
multiple definition of...

I'd really appreciate if you give me an example, considering following points:
1. do you compile DPDK with the default given instructions in Getting
Started Guide or do you change Makefiles, like adding -c for
compatibility of both c and c++ object files.
2. your cpp and h file(s)
3. Makefile
4. env. variables and/or necessary path

Also, I previously sent an email with following subject:
g++: undefined reference to
but I think current subject is more proper.

Thanks a lot in advance.

All the Best,
Hamid


More information about the dev mailing list