From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [IPv6:2607:f8b0:400c:c03::22e]) by dpdk.org (Postfix) with ESMTP id CFB3B156 for ; Thu, 2 Jan 2014 10:33:50 +0100 (CET) Received: by mail-vc0-f174.google.com with SMTP id if17so6444109vcb.19 for ; Thu, 02 Jan 2014 01:35:01 -0800 (PST) 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; bh=B9c5w/Eq592/uI4fFNi0037JrQi0WlCmPCGbesWiIak=; b=LwcM38HgQo5lcwhu+HMEaPdSWnhnpPcFi4NhEqAdcz2VOk5NwNODl1ZRghBJTjQdPR Pfmn7PY1/T50yGX7H+w6aVcsaFqWs3nnD32dkLc76K6GK1jkLZnZxAYQHewvfKL4sd+D L0qRqWHFGzuFU17+4uKyh3qT3Zid4DaMiBR/XpidIh+z9gEekEvJAYVBHnppcaCOLeXs WRo9pk4bB4Q1Zn1aRz+0ikVvs/F2urVTwfxQBxsvC/CdhiRvzmtUkqZnOsdApv8TjdTm o7nWwvAM5IeiGpNWLQHrnp5dCBNJ1G5Jbwb0b5+lF1zC339/wASGfcz/iJQxNeSl0ZF+ 7Qgw== MIME-Version: 1.0 X-Received: by 10.58.161.52 with SMTP id xp20mr1197399veb.51.1388655301022; Thu, 02 Jan 2014 01:35:01 -0800 (PST) Received: by 10.58.77.173 with HTTP; Thu, 2 Jan 2014 01:35:00 -0800 (PST) Date: Thu, 2 Jan 2014 13:05:00 +0330 Message-ID: From: Hamid Ramazani To: "dev@dpdk.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] g++: undefined reference to 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: Thu, 02 Jan 2014 09:33:51 -0000 Hi, I wanted to write a simple program using class (object oriented). I've attached my helloClass.cpp and also Makefile. after runnig make I get below errors. I think: 1. it is the problem of using c code in c++ 2. I've used extern "C" in helloClass.cpp 3. Should I recompile the DPDK from source with gcc -c argument for compatibility with g++? Thanks in advance. g++ -c helloClass.cpp -I/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include g++ helloClass.o -I/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include -lstdc++ helloClass.o: In function `rte_lcore_id': helloClass.cpp:(.text+0x7): undefined reference to `per_lcore__lcore_id' helloClass.o: In function `rte_get_master_lcore': helloClass.cpp:(.text+0x15): undefined reference to `rte_eal_get_configuration' helloClass.o: In function `rte_lcore_is_enabled': helloClass.cpp:(.text+0x2a): undefined reference to `rte_eal_get_configuration' helloClass.o: In function `HelloClass::HelloClass(int, char**)': helloClass.cpp:(.text._ZN10HelloClassC2EiPPc[_ZN10HelloClassC5EiPPc]+0x20): undefined reference to `rte_eal_init' helloClass.cpp:(.text._ZN10HelloClassC2EiPPc[_ZN10HelloClassC5EiPPc]+0x4b): undefined reference to `__rte_panic' helloClass.o: In function `HelloClass::run()': helloClass.cpp:(.text._ZN10HelloClass3runEv[HelloClass::run()]+0x3f): undefined reference to `rte_eal_remote_launch' helloClass.cpp:(.text._ZN10HelloClass3runEv[HelloClass::run()]+0x80): undefined reference to `rte_eal_mp_wait_lcore' collect2: ld returned 1 exit status make: *** [helloClass.o] Error 1 All the Best, Hamid