hardcore C gurus! (+ audi content)
#1
AudiWorld Super User
Thread Starter
hardcore C gurus! (+ audi content)
audi content: went to marina for the autoX and got turned away for being 15 minutes late...ok everyone, be early! argh, what a waste. Not a total waste of the day, got an orbital buffer...can't wait to test it out!!
ok, here's the prob. Using gcc 2.95.2 on linux: A header which is ultimately included from a cpp file includes <memory>. On the #include <memory> line I get tons of compile errors in the std headers (stl_tempbuf, stl_uninitialized) of "template with C linkage".
any ideas? gawd daymit =)
ok, here's the prob. Using gcc 2.95.2 on linux: A header which is ultimately included from a cpp file includes <memory>. On the #include <memory> line I get tons of compile errors in the std headers (stl_tempbuf, stl_uninitialized) of "template with C linkage".
any ideas? gawd daymit =)
#3
AudiWorld Super User
Thread Starter
didn't have it, but tried it, no help :(
it actually gives the compile error while parsing the std includes. further note: gcc seems to have just copied the HP std files
#6
Re: hardcore C gurus! (+ audi content)
Your description is a bit brief, but I'll take a stab at it. It
sounds like memory.h is being included from within an extern "C" {}
block of a c++ file. Since it's being included from a c++ file, it
uses templates (when included from a c file it doesnt). But, from
inside the extern "C" {} block, all that fancy c++ stuff is useless so
the compiler complains. The trick is to make sure that memory.h gets
included early, before the extern "C" {} block that is now including
it. This way the guard against multiple inclusion (#ifndef _MEMORY_H)
will kick in and prevent the contents from getting parsed.
sounds like memory.h is being included from within an extern "C" {}
block of a c++ file. Since it's being included from a c++ file, it
uses templates (when included from a c file it doesnt). But, from
inside the extern "C" {} block, all that fancy c++ stuff is useless so
the compiler complains. The trick is to make sure that memory.h gets
included early, before the extern "C" {} block that is now including
it. This way the guard against multiple inclusion (#ifndef _MEMORY_H)
will kick in and prevent the contents from getting parsed.
Trending Topics
#9
AudiWorld Super User
Thread Starter
ya, that sounds like the problem but I ran through the tree of includes and didn't see any
extern "C" around the path to <memory>....I'll check again.
btw, this isn't memory.h it's <memory>
no .h so STL.
btw, this isn't memory.h it's <memory>
no .h so STL.
#10
Dont bother looking...
There's no need to actually look for the problem Just try
the fix. If it works, go back and find the problem. Stick
a #include <memory> before any of the other includes. It wont
hurt anything and *might* get you going.
the fix. If it works, go back and find the problem. Stick
a #include <memory> before any of the other includes. It wont
hurt anything and *might* get you going.