- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
Warm greetings!
I am stuck at following compilation issue :
In file included from /usr/include/tbb/concurrent_hash_map.h:32:0,
from ../../../src/linkedlists/lockfree-list/BTO.h:10,
from ../../../src/linkedlists/lockfree-list/BTO.cpp:9,
from ../../../src/linkedlists/lockfree-list/intset.c:13:
/usr/include/tbb/tbb_stddef.h:121:56: fatal error: cstddef: No such file or directory
#include <cstddef> /* Need size_t and ptrdiff_t */
can someone please share how i can fix this.
PS : on the other hand the same tbb library works fine if i write another simple application using tbb.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am Using Ubuntu 14.04 , and GCC.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello
do you use gcc or g++ to compile your code?
from the log I see that you are compiling intset.c "C" file where you include C++ file (BTO.cpp). so the error looks that C compiler does not see C++ headers because it shouldn't.
try to rename intset.c to intset.cpp
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir
I was using g++ to compile intset.c, changing the name to intset.cpp solved the problem for me :).
may i request you , if you can elaborate why C++ header were not seen , eventhough i was using g++?
many thanks Alexandr and Vladimir for your kind help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ajay S. wrote:
may i request you , if you can elaborate why C++ header were not seen , eventhough i was using g++?
This is a question for StackOverflow, not for tbb forum:)
I think by this behaviour compilers are trying to guard developers from stupid errors related to mixing C and C++ code.
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://gcc.gnu.org/onlinedocs/gcc/Invoking-G_002b_002b.html:
"g++ is a program that calls GCC and automatically specifies linking against the C++ library. It treats ‘.c’, ‘.h’ and ‘.i’ files as C++ source files instead of C source files unless -x is used."
Hmm...
![](/skins/images/B7BA37F9CE4B52FF7CAE1FB0388839C8/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page