0

So I've just switched my project in Visual Studio to Debug mode because I have a more difficult issue I need to troubleshoot. All of the sudden now when I try to compile, I get a ton of errors. Most of them being along the lines of the following:

error C2039: 'ostream': is not a member of 'std'

Now specific to this error, I have a file.h and file.cpp

wrappers.h includes are as follows:

#include <curl/curl.h>
#include <windows.h>
#include <Shldisp.h>
#include <strsafe.h>
#include <sstream>
#include <fstream>

wrappers.cpp

#include "wrappers.h"
#include "stdafx.h"

Now, the release mode understands this just fine and gives no errors, but the Debug mode seems to not be pulling in wrappers.h's includes.

If I organize the files as follows:

wrappers.h

#include <curl/curl.h>
#include <windows.h>
#include <Shldisp.h>
#include <strsafe.h>
#include <sstream>
#include <fstream>

wrappers.cpp

#include "wrappers.h"
#include "stdafx.h"
#include <sstream>
#include <fstream>

Then suddenly the error goes away. Why would this be happening and how should I go about fixing it?

TheEggSample
  • 333
  • 4
  • 5
  • 18

0 Answers0