- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I am trying to build the code with IBM XL C/C++ which uses concurrent vector container:
#include <vector> #include "tbb/tbb.h" using namespace std; tbb::concurrent_vector<int> my_list; void add_element(int i) { my_list.push_back(i); } int main() { const int size = 100000; tbb::parallel_for(0,size,1, [=](int i) { add_element(i); } ); return 0; }
An example successfully compiles with GNU C++. But IBM XL C++ has problems. Using the following command line:
xlc++ -std=c++0x example.cpp -ltbb
I get undefined references
/tmp/83646_0.o:(.data+0x2a0): undefined reference to `tbb::internal::concurrent_vector_base_v3::~concurrent_vector_base_v3()' /tmp/83646_0.o:(.data+0x560): undefined reference to `tbb::internal::concurrent_vector_base_v3::~concurrent_vector_base_v3()' /tmp/83646_0.o:(.toc+0x180): undefined reference to `tbb::internal::concurrent_vector_base_v3::~concurrent_vector_base_v3()'
Does anybody has an experience with XLC++ compilers and TBB? The code which does not use concurrent vectors compiles also successfully with XLC++
Link Copied
0 Replies
![](/skins/images/406383E7D32C62C6E4F7327A35AB307E/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page