DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hamid Ramazani <mrramazani@gmail.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Useful: Simple C++ program & Makefile
Date: Fri, 10 Jan 2014 10:00:10 +0330	[thread overview]
Message-ID: <CACu58pBWCBgqzabX5CHAeSOLeXxPFQ3H=HWBX2SW-vWhUYMq-g@mail.gmail.com> (raw)

> I don't exactly know what is needed for C++. Please keep us informed.

Hey Thomas,

I've attached a simple program (main.cpp main.h and Makefile) that has
a C++ class and just prints some messages in the output.
Despite the fact that it's working fine, I'm sure the Makefile could
be written much better; Maybe I made it completer in future.

All the Best,
--Hamid

On 1/3/14, Thomas Monjalon <thomas.monjalon@6wind.com> wrote:
> Hello,
>
> 03/01/2014 11:48, Hamid Ramazani :
>> eal_timer.c:(.text+0x42c): undefined reference to `clock_gettime'
>
> From "man clock_gettime":
> Link with -lrt (only for glibc versions before 2.17).
>
>> 	g++ -m64 -pthread  -march=native -DRTE_MACHINE_CPUFLAG_SSE
>> -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSSE3
>> -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SS
>> SE3 -I/home/hamid/dpdk/dpdk-1.5.1r1/examples/sample/build/include
>> -I/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include
>> -include
>> /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include/rte_conf
>> ig.h -O3 -W -Wall -Werror -Wmissing-declarations -Wpointer-arith
>> -Wcast-align -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef
>> -Wwrite-strings -Wl,-melf_x86_64 -Wl,-export-dynamic sample.cpp -o
>> sample -Wl,-L/home/hamid/dpdk/dpdk-1.5.1r1/examples/sample/build/lib
>> -Wl,-L/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib
>> -Wl,-L/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib
>> -Wl,-lrte_kni -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ixgbe -Wl,-lrte_mbuf
>> -Wl,-lrte_cmdline -Wl,-lrte_timer -Wl,-lrte_hash -Wl,-lrte_lpm
>> -Wl,--start-group -Wl,-lethdev -Wl,-lrte_malloc -Wl,-lrte_mempool
>> -Wl,-lrte_ring -Wl,-lrte_eal -Wl,-ldl -Wl,--end-group
>
> Try CONFIG_RTE_BUILD_COMBINE_LIBS=y and -lintel_dpdk instead of all these
> libraries. You can also remove the warning options if you want.
>
> You can also try to build your Makefile by including files like
> mk/rte.extapp.mk and defining CC=g++.
> I don't exactly know what is needed for C++. Please keep us informed.
>
> --
> Thomas
>

             reply	other threads:[~2014-01-10  6:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-10  6:30 Hamid Ramazani [this message]
2014-01-10 20:19 ` Dan Kan
2014-01-10 23:42   ` Dan Kan
2014-04-29 16:46     ` Hamid Ramazani

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='CACu58pBWCBgqzabX5CHAeSOLeXxPFQ3H=HWBX2SW-vWhUYMq-g@mail.gmail.com' \
    --to=mrramazani@gmail.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /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).