samedi 30 janvier 2016

Xcode 7.2 can't find c++ std::pair

First of all, I use Xcode 7.2 on OSX 10.11.2. In my main.cpp file, the std library is working fine. But, whenever I try to use it in any other c++ file, I get unexpected unqualified-id.

I have the following files :

main.cpp (std is working in it)

algo.hpp (std is not working in it)

algo.cpp (std is not working in it)

Why is the deployment target OSX 10.11 not finding the standard c++ library in all my files ?

Here is for exemple my header file algo.hpp

#ifndef algo_hpp
#define algo_hpp

std::pair<unsigned int, unsigned int> pgcdFB(const int m,const int n);

std::pair<unsigned int, unsigned int> euclide(const int m, const int n);

unsigned int fibonacci(const unsigned int i);

#endif /* algo_hpp */

On each line where I use std I get undeclared identifier 'std

Aucun commentaire:

Enregistrer un commentaire