All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Useful: Simple C++ program & Makefile
@ 2014-01-10  6:30 Hamid Ramazani
       [not found] ` <CACu58pBWCBgqzabX5CHAeSOLeXxPFQ3H=HWBX2SW-vWhUYMq-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Hamid Ramazani @ 2014-01-10  6:30 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev-VfR2kkLFssw

> 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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> 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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Useful: Simple C++ program & Makefile
       [not found] ` <CACu58pBWCBgqzabX5CHAeSOLeXxPFQ3H=HWBX2SW-vWhUYMq-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-01-10 20:19   ` Dan Kan
       [not found]     ` <CA+RRbcrU1sW26zpvLV+a3YVnO5iiEEGe15dU2bFzqH_cfD1V4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Kan @ 2014-01-10 20:19 UTC (permalink / raw)
  To: Hamid Ramazani; +Cc: dev-VfR2kkLFssw

Hamid,
I'm in the same situation as you in which I would like to write most of the
application logic in C++. I was able to use CC=g++ by slightly modifying
the makefiles in mk. I replaced all occurrences of "%.c" with "%.cc" using
the following command.

find . -name "*.mk" -exec sed -i 's/%\.c\([^[:alpha:]]\)/%\.cc\1/g' {} \;

I also remove some warning flags as errors.

Here are the diffs:

diff -r mk/internal/rte.compile-pre.mk ../temp/dpdk-1.5.1r2/mk/internal/
rte.compile-pre.mk
39c39
< src2obj = $(strip $(patsubst %.cc,%.o,\
---
> src2obj = $(strip $(patsubst %.c,%.o,\
48c48
< src2dep = $(strip $(call dotfile,$(patsubst %.cc,%.o.d, \
---
> src2dep = $(strip $(call dotfile,$(patsubst %.c,%.o.d, \
53c53
< src2cmd = $(strip $(call dotfile,$(patsubst %.cc,%.o.cmd, \
---
> src2cmd = $(strip $(call dotfile,$(patsubst %.c,%.o.cmd, \
125c125
< %.o: %.cc $$(wildcard $$(dep_$$@)) $$(DEP_$$(@)) FORCE
---
> %.o: %.c $$(wildcard $$(dep_$$@)) $$(DEP_$$(@)) FORCE
diff -r mk/rte.module.mk ../temp/dpdk-1.5.1r2/mk/rte.module.mk
36,37c36,37
< ifneq ($(MODULE),$(notdir $(SRCS-y:%.cc=%)))
< $(MODULE)-objs += $(notdir $(SRCS-y:%.cc=%.o))
---
> ifneq ($(MODULE),$(notdir $(SRCS-y:%.c=%)))
> $(MODULE)-objs += $(notdir $(SRCS-y:%.c=%.o))
diff -r mk/toolchain/gcc/rte.vars.mk ../temp/dpdk-1.5.1r2/mk/toolchain/gcc/
rte.vars.mk
71,73c71,73
< WERROR_FLAGS := -W -Wall -Werror
< WERROR_FLAGS += -Wmissing-declarations -Wpointer-arith
< WERROR_FLAGS += -Wcast-align -Wcast-qual
---
> WERROR_FLAGS := -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
> WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition
-Wpointer-arith
> WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual


Dan


On Thu, Jan 9, 2014 at 10:30 PM, Hamid Ramazani <mrramazani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:

> > 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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> 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
> >
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Useful: Simple C++ program & Makefile
       [not found]     ` <CA+RRbcrU1sW26zpvLV+a3YVnO5iiEEGe15dU2bFzqH_cfD1V4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-01-10 23:42       ` Dan Kan
       [not found]         ` <CA+RRbcp9VqCkfDKYwYLHsOWJsCKMWGwQ1ViXB=iujPa1rRY4jA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Kan @ 2014-01-10 23:42 UTC (permalink / raw)
  To: Hamid Ramazani; +Cc: dev-VfR2kkLFssw

I forgot to add that you will also need to add -D__STDC_LIMIT_MACROS
because C99 standard specifies that limits such as INT8_MAX should only be
defined if explicitly requested. Also with g++, you can no longer use
non-trivial designated initializers which are used extensively throughout
dpdk sample apps. For example,

static const struct rte_eth_rxconf rx_conf = {
    .rx_thresh = {
        .pthresh = RX_PTHRESH,
        .hthresh = RX_HTHRESH,
        .wthresh = RX_WTHRESH,
    },
    .rx_free_thresh = 32,
};


Basically, use gcc to build the dpdk libraries. Then, use g++ to build your
own code and link against the built libraries.

Dan


On Fri, Jan 10, 2014 at 12:19 PM, Dan Kan <dan-nm7580oGLDTQT0dZR+AlfA@public.gmane.org> wrote:

> Hamid,
> I'm in the same situation as you in which I would like to write most of
> the application logic in C++. I was able to use CC=g++ by slightly
> modifying the makefiles in mk. I replaced all occurrences of "%.c" with
> "%.cc" using the following command.
>
> find . -name "*.mk" -exec sed -i 's/%\.c\([^[:alpha:]]\)/%\.cc\1/g' {} \;
>
> I also remove some warning flags as errors.
>
> Here are the diffs:
>
> diff -r mk/internal/rte.compile-pre.mk ../temp/dpdk-1.5.1r2/mk/internal/
> rte.compile-pre.mk
> 39c39
> < src2obj = $(strip $(patsubst %.cc,%.o,\
> ---
> > src2obj = $(strip $(patsubst %.c,%.o,\
> 48c48
> < src2dep = $(strip $(call dotfile,$(patsubst %.cc,%.o.d, \
> ---
> > src2dep = $(strip $(call dotfile,$(patsubst %.c,%.o.d, \
> 53c53
> < src2cmd = $(strip $(call dotfile,$(patsubst %.cc,%.o.cmd, \
> ---
> > src2cmd = $(strip $(call dotfile,$(patsubst %.c,%.o.cmd, \
> 125c125
> < %.o: %.cc $$(wildcard $$(dep_$$@)) $$(DEP_$$(@)) FORCE
> ---
> > %.o: %.c $$(wildcard $$(dep_$$@)) $$(DEP_$$(@)) FORCE
> diff -r mk/rte.module.mk ../temp/dpdk-1.5.1r2/mk/rte.module.mk
> 36,37c36,37
> < ifneq ($(MODULE),$(notdir $(SRCS-y:%.cc=%)))
> < $(MODULE)-objs += $(notdir $(SRCS-y:%.cc=%.o))
> ---
> > ifneq ($(MODULE),$(notdir $(SRCS-y:%.c=%)))
> > $(MODULE)-objs += $(notdir $(SRCS-y:%.c=%.o))
> diff -r mk/toolchain/gcc/rte.vars.mk../temp/dpdk-1.5.1r2/mk/toolchain/gcc/
> rte.vars.mk
> 71,73c71,73
> < WERROR_FLAGS := -W -Wall -Werror
> < WERROR_FLAGS += -Wmissing-declarations -Wpointer-arith
> < WERROR_FLAGS += -Wcast-align -Wcast-qual
> ---
> > WERROR_FLAGS := -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
> > WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition
> -Wpointer-arith
> > WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual
>
>
> Dan
>
>
> On Thu, Jan 9, 2014 at 10:30 PM, Hamid Ramazani <mrramazani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:
>
>> > 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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> 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
>> >
>>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Useful: Simple C++ program & Makefile
       [not found]         ` <CA+RRbcp9VqCkfDKYwYLHsOWJsCKMWGwQ1ViXB=iujPa1rRY4jA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-04-29 16:46           ` Hamid Ramazani
  0 siblings, 0 replies; 4+ messages in thread
From: Hamid Ramazani @ 2014-04-29 16:46 UTC (permalink / raw)
  To: Dan Kan; +Cc: dev-VfR2kkLFssw

Hi,

this post might be a little old, but there is point which might be
really important for C++ developers using DPDK:

C++, especially C++11, doesn't support "designated initializes" of C,
instead of that you can use "memset" and set the instance of a
struct/class to 0/NULL/nullptr and then you can assign proper values
to the members of that struct/class by . or -> (if it is pointer).

Remember that even empty-initialization list in C++ (just a simple {}
) doesn't set things to 0/NULL/nullptr/flase (default values), and you
may have garbage values which cause problems in your application.

Hope this saves you from lots of headache.

All the Best,
Hamid

On 1/11/14, Dan Kan <dan-nm7580oGLDTQT0dZR+AlfA@public.gmane.org> wrote:
> I forgot to add that you will also need to add -D__STDC_LIMIT_MACROS
> because C99 standard specifies that limits such as INT8_MAX should only be
> defined if explicitly requested. Also with g++, you can no longer use
> non-trivial designated initializers which are used extensively throughout
> dpdk sample apps. For example,
>
> static const struct rte_eth_rxconf rx_conf = {
>     .rx_thresh = {
>         .pthresh = RX_PTHRESH,
>         .hthresh = RX_HTHRESH,
>         .wthresh = RX_WTHRESH,
>     },
>     .rx_free_thresh = 32,
> };
>
>
> Basically, use gcc to build the dpdk libraries. Then, use g++ to build your
> own code and link against the built libraries.
>
> Dan
>
>
> On Fri, Jan 10, 2014 at 12:19 PM, Dan Kan <dan-nm7580oGLDTQT0dZR+AlfA@public.gmane.org> wrote:
>
>> Hamid,
>> I'm in the same situation as you in which I would like to write most of
>> the application logic in C++. I was able to use CC=g++ by slightly
>> modifying the makefiles in mk. I replaced all occurrences of "%.c" with
>> "%.cc" using the following command.
>>
>> find . -name "*.mk" -exec sed -i 's/%\.c\([^[:alpha:]]\)/%\.cc\1/g' {} \;
>>
>> I also remove some warning flags as errors.
>>
>> Here are the diffs:
>>
>> diff -r mk/internal/rte.compile-pre.mk ../temp/dpdk-1.5.1r2/mk/internal/
>> rte.compile-pre.mk
>> 39c39
>> < src2obj = $(strip $(patsubst %.cc,%.o,\
>> ---
>> > src2obj = $(strip $(patsubst %.c,%.o,\
>> 48c48
>> < src2dep = $(strip $(call dotfile,$(patsubst %.cc,%.o.d, \
>> ---
>> > src2dep = $(strip $(call dotfile,$(patsubst %.c,%.o.d, \
>> 53c53
>> < src2cmd = $(strip $(call dotfile,$(patsubst %.cc,%.o.cmd, \
>> ---
>> > src2cmd = $(strip $(call dotfile,$(patsubst %.c,%.o.cmd, \
>> 125c125
>> < %.o: %.cc $$(wildcard $$(dep_$$@)) $$(DEP_$$(@)) FORCE
>> ---
>> > %.o: %.c $$(wildcard $$(dep_$$@)) $$(DEP_$$(@)) FORCE
>> diff -r mk/rte.module.mk ../temp/dpdk-1.5.1r2/mk/rte.module.mk
>> 36,37c36,37
>> < ifneq ($(MODULE),$(notdir $(SRCS-y:%.cc=%)))
>> < $(MODULE)-objs += $(notdir $(SRCS-y:%.cc=%.o))
>> ---
>> > ifneq ($(MODULE),$(notdir $(SRCS-y:%.c=%)))
>> > $(MODULE)-objs += $(notdir $(SRCS-y:%.c=%.o))
>> diff -r
>> mk/toolchain/gcc/rte.vars.mk../temp/dpdk-1.5.1r2/mk/toolchain/gcc/
>> rte.vars.mk
>> 71,73c71,73
>> < WERROR_FLAGS := -W -Wall -Werror
>> < WERROR_FLAGS += -Wmissing-declarations -Wpointer-arith
>> < WERROR_FLAGS += -Wcast-align -Wcast-qual
>> ---
>> > WERROR_FLAGS := -W -Wall -Werror -Wstrict-prototypes
>> > -Wmissing-prototypes
>> > WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition
>> -Wpointer-arith
>> > WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual
>>
>>
>> Dan
>>
>>
>> On Thu, Jan 9, 2014 at 10:30 PM, Hamid Ramazani
>> <mrramazani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:
>>
>>> > 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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> 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
>>> >
>>>
>>
>>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-29 16:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-10  6:30 Useful: Simple C++ program & Makefile Hamid Ramazani
     [not found] ` <CACu58pBWCBgqzabX5CHAeSOLeXxPFQ3H=HWBX2SW-vWhUYMq-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-10 20:19   ` Dan Kan
     [not found]     ` <CA+RRbcrU1sW26zpvLV+a3YVnO5iiEEGe15dU2bFzqH_cfD1V4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-10 23:42       ` Dan Kan
     [not found]         ` <CA+RRbcp9VqCkfDKYwYLHsOWJsCKMWGwQ1ViXB=iujPa1rRY4jA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-29 16:46           ` Hamid Ramazani

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.