Console Not Showing
-
- Posts: 10
- Joined: Tue Nov 19, 2013 3:35 am
Console Not Showing
I am trying to get through some of the tutorials, but whenever I try to use driverchoiceconsole(), nothing happens. I've gone through debug mode and found that driverchoiceconsole() is simply returning EDT_COUNT, but isn't displaying the choices. Up until this point, I have hard-coded the driver to OpenGL, but this time I want to get the console working. I created my project in VS2013 as a Win32 Project, with empty project selected in the wizard. Irrlicht works fine (when I hard-code it to OpenGL), but the console simply won't show up. I have searched this thoroughly in google and in these forums, and found nothing. What project settings / preprocessor directives do I need to do for the console to show up?
Re: Console Not Showing
Right-click on your project, Properties -> Linker -> System and on the right side is SubSystem (you maybe have Windows choosed, change it to Console).
-
- Posts: 10
- Joined: Tue Nov 19, 2013 3:35 am
Re: Console Not Showing
Done. Still no effect. Do I have to re-create my project as a console application?
Re: Console Not Showing
no but the main function has to be initiated a bit differently
this is how you initiate when you wanna run without the console
and with it
this is how you initiate when you wanna run without the console
Code: Select all
int WINAPI WinMain( HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow){
Code: Select all
int _tmain(int argc, _TCHAR* argv[]){
Last edited by Granyte on Sun Dec 22, 2013 9:26 pm, edited 1 time in total.
-
- Posts: 10
- Joined: Tue Nov 19, 2013 3:35 am
Re: Console Not Showing
I created the next tutorial as a console application, but it's not showing up either. This is really wierd.
Here's what I'm testing (I have all the irrlicht headers and using's before this, and the include and lib folder set up):
What is expected is for the console to clear, the driver choice console to show up (or not), for it to wait for you, output "TEST\n", and wait for you again. Instead, I get the first wait message (I see a console window closing), then I press a key, I see another console window closing, and I get another wait message. "TEST\n" is not outputted.
Here's what I'm testing (I have all the irrlicht headers and using's before this, and the include and lib folder set up):
Code: Select all
int main()
{
system("cls");
E_DRIVER_TYPE driverType = driverChoiceConsole();
system("pause");
cout << "TEST" << endl;
system("pause");
return 0;
}
-
- Posts: 10
- Joined: Tue Nov 19, 2013 3:35 am
Re: Console Not Showing
I haven't been using WinMain or any win32 stuff. Just int main() as I did in console applications a few years ago.Granyte wrote:no but the main function has to be initiated a bit differently
this is how you initiate when you wanna run without the consoleand with itCode: Select all
int WINAPI WinMain( HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow){
Code: Select all
int _tmain(int argc, _TCHAR* argv[]){
Please note all of the projects so far work perfectly, except for the console behaving oddly.
-
- Posts: 10
- Joined: Tue Nov 19, 2013 3:35 am
Re: Console Not Showing
I've created my project as a console application, this time with all the default settings (not an empty project), and the console is working perfectly. Weird...