diff --git a/include/streamwrapper.h b/include/streamwrapper.h index 42c683b732..574a60dae5 100644 --- a/include/streamwrapper.h +++ b/include/streamwrapper.h @@ -27,6 +27,8 @@ #if defined( WIN32 ) && defined( __GNUC__ ) #include + #define OSTREAM std::ostream + #define OPEN_OSTREAM( var, name ) \ kicad::stream var ## _BUF_; \ std::ostream& var = *var ## _BUF_.Open( name, std::ios_base::out | std::ios_base::trunc | std::ios_base::binary ) @@ -63,6 +65,8 @@ #elif defined( _MSC_VER ) // defined( WIN32 ) && defined( __GNUC__ ) + #define OSTREAM std::ofstream + #define OPEN_OSTREAM( var, name ) \ std::ofstream var; \ var.open( wxString::FromUTF8Unchecked( name ).wc_str(), \ @@ -82,6 +86,8 @@ #else // defined( WIN32 ) && defined( __GNUC__ ) + #define OSTREAM std::ofstream + #define OPEN_OSTREAM( var, name ) \ std::ofstream var; \ var.open( name, std::ios_base::out | std::ios_base::trunc ) diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index 590504584f..b09e1d62ca 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -416,7 +416,7 @@ static void write_triangle_bag( std::ostream& aOut_file, VRML_COLOR& aColor, static void write_layers( MODEL_VRML& aModel, BOARD* aPcb, - const char* aFileName, std::ofstream* aOutputFile ) + const char* aFileName, OSTREAM* aOutputFile ) { // VRML_LAYER board; aModel.m_board.Tesselate( &aModel.m_holes );