Hi all. I'm a noob and unfamiliar with boost. It has also been a long time since I have done any C++ programming. In any case, here are the details:

I am trying to compile MecnRao/TCP-UDP-Proxy that uses the Boost Library. I am trying to compile this for Windows, ultimately Windows 10, but at the moment trying to compile on my Windows 7 VM. I am using Visual Studio Pro 2019. After trying the latest version of the Boost Library with some errors due to some deprecated members, I bounced around older versions until finding that Version 1.68.0 reduced my compile errors substantially, and of those 20 or so errors, are caused by some typedef problems in fstream.hpp. (I could be wrong, but the errors all seem to be related to fstream_fix.)

Specifically, I get the following errors to begin with:

'fstream_fix<std::basic_ifstream<char,std::char_traits<char> > >' is not a variable template
'fstream_fix<std::basic_ofstream<char,std::char_traits<char> > >' is not a variable template

This comes from the following lines in the fstream.hpp

  typedef basic_ifstream<char> ifstream;

  typedef basic_ofstream<char> ofstream;


Where ifstream and ofstream are indicated as being redefined as

#define ifstream fstream_fix<std::ifstream>

#define ofstream fstream_fix<std::ofstream>


Within the program


with fstream_fix as


template<class T>

struct fstream_fix

: public T

{

fstream_fix(){};


template<class T1>

fstream_fix(T1 v1){

setlocale(LC_CTYPE, "");

T::open(v1);

setlocale(LC_CTYPE, 0);

}


template<class T1,class T2>

fstream_fix(T1 v1,T2 v2){

setlocale(LC_CTYPE, "");

T::open(v1,v2);

setlocale(LC_CTYPE, 0);

}



template<class T1>

void open(T1 v1){

setlocale(LC_CTYPE, "");

T::open(v1);

setlocale(LC_CTYPE, 0);

}


template<class T1,class T2>

void open(T1 v1,T2 v2){

setlocale(LC_CTYPE, "");

T::open(v1,v2);

setlocale(LC_CTYPE, 0);

}

};



So I'm wondering if this is a newer/different compiler issue? Or the application itself? Or maybe just missing something like uses namespace std.


I am hoping someone can help me nip this last problem so I can get this compiled.


Thanks,


Mack