LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   compiler can't find <new> (http://www.linuxquestions.org/questions/programming-9/compiler-cant-find-new-807334/)

n3wb 05-12-2010 04:41 AM

compiler can't find <new>
 
My compiler won't find <new>. Since it's such a basic function, I'm a bit confused. Is <new> supposed to be in a file of its own? Where do I find it? And if it turns out to be missing on my computer, where can I find a <new> one? Or do you see anything else that I do wrong?

Edit: After some trying out, it seems I can't find stuff like iostream or any other basic stuff either. The compiler is prolly looking for them at the wrong place. Does anyone know how I change or add paths for the compiler to look in when using the "<>" operator?


mb-linux-g++ -Os -g -fomit-frame-pointer -pipe -fno-common
-fno-builtin -Wall -mno-xl-soft-mul -mcpu=v7.20.d -DEMBED
-I/edu/axewi667/peta/petalinux-v0.40-final/software/petalinux-dist
-I/edu/axewi667/peta/petalinux-v0.40-final/software/petalinux-dist/include
-I/edu/axewi667/peta/petalinux-v0.40-final/software/petalinux-dist/include
-Dlinux -D__linux__ -Dunix -DLINUX -c -o upnp.o upnp.cpp
In file included from NptStreams.h:43,
from Neptune.h:49,
from PltTaskManager.h:40,
from PltUPnP.h:40,
from upnp.cpp:37:
NptStrings.h:40:15: error: new: No such file or directory
NptStrings.h: In static member function ‘static NPT_String::Buffer*
NPT_String::Buffer::Allocate(NPT_Size, NPT_Size)’:
NptStrings.h:192: error: no matching function for call to ‘operator
new(long unsigned int, void*&)’
<built-in>:0: note: candidates are: void* operator new(long unsigned int)
upnp.cpp: At global scope:
upnp.cpp:94: warning: ‘bool UpdateState(PLT_DeviceHostReference&)’
defined but not used
make: *** [upnp.o] Error 1

JohnGraham 05-12-2010 05:58 AM

How did you get mb-linux-g++ - I assume from a package installer?

What distribution are you using? If it's any help, on Debian you can just 'apt-get install build-essential'.

orgcandman 05-12-2010 11:11 AM

Code:

<built-in>:0: note: candidates are: void* operator new(long unsigned int)
Did you notice this line? Can you post the snippet of your use of new?


All times are GMT -5. The time now is 03:14 AM.