I'm trying to compile with a brand new install of Xcode 14. A very simple .cpp and .h for testing.
The .h has:
#include "mcut.h"
#include <stdio.h>
#include <stdlib.h>
The .cpp has:
#include "MCut_Wrapper.hpp"
#include <iostream>
I know this doesn't do anything.... but with the #include <iostream>
When I compile I suddenly get:
- No member named 'memcpy' in namespace 'std::__1'; did you mean simply 'memcpy'?
- No member named 'memmove' in namespace 'std::1'; did you mean simply 'memmove'?_
etc.
without the #include <iostream> everything compiles without any errors.
The same errors show up for any #includes such as <vector> <map> etc.
I've also tried adding using namespace std;
But that doesn't work.
I've tried a simple hello world program like this:
#include "MCut_Wrapper.hpp"
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector<string> msg{"Hello", "C++", "World", "from", "VS Code", "and the C++ extension!"};
for (const string& word : msg)
{
cout << word << " ";
}
cout << endl;
}
But it also throws out the same error.
Any and all assistance to get this working would be appreciated. I'm attempting to make a bundle with Xcode 14 on a machine with an M2 Max Chip (if that makes any difference).
Cheers