Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: hamzaniazni on February 16, 2011, 12:34:57 pm

Title: How Using Wineconsole cmd in Code Blocks Ubuntu Platform as default console
Post by: hamzaniazni on February 16, 2011, 12:34:57 pm


I'm new to ubuntu and code blocks...i like to create windows program in ubuntu using code blocks..Please Help me..:)
Title: Re: How Using Wineconsole cmd in Code Blocks Ubuntu Platform as default console
Post by: hamzaniazni on February 16, 2011, 12:55:18 pm
how to use windows command prompt in wine to run console application create in ubuntu
Title: Re: How Using Wineconsole cmd in Code Blocks Ubuntu Platform as default console
Post by: oBFusCATed on February 16, 2011, 01:13:29 pm
What is the command to run the wine console?
Title: Re: How Using Wineconsole cmd in Code Blocks Ubuntu Platform as default console
Post by: hamzaniazni on February 16, 2011, 04:38:49 pm
command to run directly from terminal:

wineconsole cmd

can we use wineconsole cmd as replacement of xterm??
Title: Re: How Using Wineconsole cmd in Code Blocks Ubuntu Platform as default console
Post by: Jenna on February 16, 2011, 04:57:06 pm
command to run directly from terminal:

wineconsole cmd

can we use wineconsole cmd as replacement of xterm??
You don't need that to run windows apps on linux if your system is set up correctly (binfmt-support).
wine (or wineserver should start automagically and (in most cases) seamless.
At least if I configure it as console app (also for gui apps) it works fine.

Tested on debian with a simple console project and a wxWidgets project with a library and a main (gui-)app, both compiled with MinGW32 cross-compiler, and wxWidgets cross-libs for the second.
Title: Re: How Using Wineconsole cmd in Code Blocks Ubuntu Platform as default console
Post by: oBFusCATed on February 16, 2011, 06:21:56 pm
can we use wineconsole cmd as replacement of xterm??
No, because it is not a terminal emulator, but shell emulator or something like that...
Title: Re: How Using Wineconsole cmd in Code Blocks Ubuntu Platform as default console
Post by: hamzaniazni on February 17, 2011, 11:26:30 am
ohhh...really??thanks...just i have dual boot with windows in my computer..ubuntu and windows...my group project used system("cls") to clear to program in console application..but the system("cls") doesn't work in ubuntu..except i used wine to run the windows excutable program through the wineconsole..so think by using wineconsole i can avoid this problem...when i build and run the program..it's run smoothly but onlu screen clear not working...any suggestion???
Title: Re: How Using Wineconsole cmd in Code Blocks Ubuntu Platform as default console
Post by: oBFusCATed on February 17, 2011, 12:32:12 pm
You can use:
Code
#ifndef _WIN32
system("clear");
#else
system("cls");
#endif
Title: Re: How Using Wineconsole cmd in Code Blocks Ubuntu Platform as default console
Post by: hamzaniazni on February 17, 2011, 02:56:08 pm
Thanks...but not work....is there another way..to setting up code blocks to run wine dos console when i try to run the program...the situation is when i run exe file in debug folder it will open wine dos console...so the system cls will work...i had try alias cls='clear'..but also not work..or there are option to install ms-dos console in ubuntu..that i can use it to run my program from code blocks..thanks...