I had linker error: undefined reference to windows.h functions like textout,selectobject,beginpaint. But I was able to remove the error by adding "-mwindows" in sublime build system. But now im not able to get any output in windows terminal. Eg: if i try to use printf("test"); it won't show any output in windows terminal and textout() will only output textout string in gui window.
I tried it with codeblocks and it was able to get output of printf in windows terminal and textout in another window.
Is there anyway i can make sublime build system do the same?
{ "cmd": ["gcc", "-Wall","-mwindows","-pedantic-errors", "$file_name","-o", "${file_base_name}.exe", "&&", "start", "cmd", "/k" , "$file_base_name"], "selector": "source.c", "working_dir": "${file_path}", "shell": true }
-mwindows.