I have built the facebook folly libraries by using the following link given below
https://github.com/facebook/folly
#include <iostream>
#include <stdlib.h>
#include <algorithm>
#include <typeinfo>
#include <vector>
#include "folly/FBVector.h"
int main()
{
folly::fbvector<int> vec;
folly::fbvector<int>::iterator vIter;
int i = 0;
for(i = 0;i < 10;i++)
{
vec.push_back(i);
}
for(i = 0 ; i <=vec.size();i++)
{
cout << vec[i] << endl;
}
vec.erase(vec.begin()+ 5);
vec.insert(vec.begin()+5,25);
vec.insert(vec.begin()+5,5);
vec.insert(vec.begin()+5,5);
sort(vec.begin(),vec.end());
cout << "Using Iteration Concept " << endl;
for(vIter = vec.begin() ; vIter != vec.end();vIter++)
{
cout << *vIter << endl;
}
return 0;
}
After writting this code ,just compiled it..when i was compiling,getting the following issue..
syscon@syscon-OptiPlex-3020:~/Documents/work/folly/folly-master$ g++ -o stl stl.cpp -std=c++11 -lboost_system
/tmp/cc2WeDlr.o: In function folly::usingJEMalloc()':stl.cpp:(.text._ZN5folly13usingJEMallocEv[_ZN5folly13usingJEMallocEv]+0x2d): undefined reference to
folly::usingJEMallocSlow()'
collect2: error: ld returned 1 exit status
which library i need to include inorder to solve this issue?