DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hamid Ramazani <mrramazani@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] Object Oriented DPDK: c++ class
Date: Thu, 2 Jan 2014 20:21:06 +0330	[thread overview]
Message-ID: <CACu58pDiMqC+JT+XGE6dXy343nTzQ1GWN_3LXPNSpyyXz1n4hA@mail.gmail.com> (raw)

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

                 reply	other threads:[~2014-01-02 16:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACu58pDiMqC+JT+XGE6dXy343nTzQ1GWN_3LXPNSpyyXz1n4hA@mail.gmail.com \
    --to=mrramazani@gmail.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).