#Hiding Console Window Without Windows.h

11 messages · Page 1 of 1 (latest)

dusty glade
#

-Wl,--subsystem,windows

#

ah

#

I don't know exactly what you need but what I suggest is you create a separate .c / .cpp file that only includes windows.h

#

and there you declare redirections for all the functions you want to use

#

what function from windows.h do you want?

#
//func.hpp
void show_console_window();

//func.cpp
#include <windows.h>
void show_console_window(){
  HWND Console;
  AllocConsole();
  Console = FindWindowA("ConsoleWindowClass", NULL);
  ShowWindow(Console, 0);
}
dusty glade
#

the namespace has nothing to do with that

#

it is because you are missing the func.cpp file ine the compilation

#

and well, hide_console_window also needs to be defined and implemented

dusty glade
#

that error

#

is caused by an implementation missing