From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id 3B7A4C7EE for ; Wed, 29 Apr 2015 14:17:08 +0200 (CEST) Received: by wief7 with SMTP id f7so38825385wie.0 for ; Wed, 29 Apr 2015 05:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=1iSXLywcBffZvX2N5Qc9XV+9JvrfiP+AQZEGrFJDsuc=; b=BLjqKh78sW2fp/OjodoBlxIQlSaQz/mzq2XmPgh/fn9t97gqzC7IlLpEZJhxLx80PD CTgQH601pOF/mW5iMtySgvRNNkUFgHjbgwztkswnk/wpd1uwKLoyEFXF8eNdI6uhN+B0 OnN60nXABZ9i1K+osKFnUd6mn14KUtLyxur9DG0wyXaBQ95Z10J6lwNA6qtc8gFMjskA qYFbOUSkgpMJdsFOoNpHXCw7D3Sd8QVREaEn9DtRDM2cO/mVlond5cnU5xwJD/a+GE2+ thNuxRxquSLVkR5I2P7Ov6glWbYk/KKeFAw/dLEnWp6HqKnfncpPY1Iw/X5jqME8cYRp p4tQ== MIME-Version: 1.0 X-Received: by 10.194.81.104 with SMTP id z8mr41010758wjx.45.1430309827998; Wed, 29 Apr 2015 05:17:07 -0700 (PDT) Received: by 10.27.136.70 with HTTP; Wed, 29 Apr 2015 05:17:07 -0700 (PDT) Date: Wed, 29 Apr 2015 15:17:07 +0300 Message-ID: From: Pavel Odintsov To: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [dpdk-dev] Issues with rte_hash_crc.h when compiling with C++ X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 12:17:08 -0000 Hello! I have C++ application compiles and works nice. But when I include rte_hash_crc.h header everything goes away. CC main.o In file included from /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_cpuflags.h:46:0, from /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_hash_crc.h:48, from /root/interceptor/main.cpp:25: /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags= .h:50:6: error: use of enum =E2=80=98rte_cpu_flag_t=E2=80=99 without previous declar= ation enum rte_cpu_flag_t; ^ /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags= .h:55:6: error: use of enum =E2=80=98cpu_register_t=E2=80=99 without previous declar= ation enum cpu_register_t; ^ /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags= .h:79:35: error: uninitialized const =E2=80=98cpu_feature_table=E2=80=99 [-fpermissiv= e] static const struct feature_entry cpu_feature_table[]; ^ /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags= .h:64:8: note: =E2=80=98const struct feature_entry=E2=80=99 has no user-provided def= ault constructor struct feature_entry { ^ /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags= .h:65:11: note: and the implicitly-defined constructor does not initialize =E2=80=98uint32_t feature_entry::leaf=E2=80=99 uint32_t leaf; /**< cpuid leaf */ ^ /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags= .h:79:53: error: storage size of =E2=80=98cpu_feature_table=E2=80=99 isn=E2=80=99t kn= own static const struct feature_entry cpu_feature_table[]; ^ /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags= .h:101:31: error: use of enum =E2=80=98rte_cpu_flag_t=E2=80=99 without previous declar= ation rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature); ^ In file included from /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_hash_crc.h:48:0, from /root/interceptor/main.cpp:25: /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_cpuflags.h: In function =E2=80=98int rte_cpu_get_flag_enabled(rte_cpu_flag_t)=E2=80=99: /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_cpuflags.h:278:5= 3: error: conflicting declaration of C function =E2=80=98int rte_cpu_get_flag_enabled(rte_cpu_flag_t)=E2=80=99 rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature) ^ In file included from /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_cpuflags.h:46:0, from /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_hash_crc.h:48, from /root/interceptor/main.cpp:25: /usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags= .h:101:1: note: previous declaration =E2=80=98int rte_cpu_get_flag_enabled(int)=E2=80= =99 rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature); ^ /usr/src/dpdk-2.0.0/mk/internal/rte.compile-pre.mk:145: recipe for target 'main.o' failed make[1]: *** [main.o] Error 1 /usr/src/dpdk-2.0.0/mk/rte.extapp.mk:42: recipe for target 'all' failed make: *** [all] Error 2 I prepared my environment with this manual: http://www.stableit.ru/2015/04/how-to-code-for-dpdk-with-c.html Could anybody help me with this header file and C++? --=20 Sincerely yours, Pavel Odintsov