About Store Forum Documentation Contact
Donations:
227$/mo



Post Reply 
Console for development
Author Message
Dynad Offline
Member

Post: #1
Console for development
Hey,

Ive a question about console: is there a way to activate this so i can easily throw print_f() to it so i can see realtime whats going on. Like Ogre3D has this, the render starts from the console. Yes ive seen the tutorial about running EE from a dll but thats all you can do with it. You can't see actually engine stuff in the console.

Is this alot of work to add? I really like to have this option smile


Thanks in advance,
~Dynad

There is always evil somewhere, you just have to look for it properly.
10-06-2010 07:25 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Console for development
I guess you can manually spawn a console window using WIN API
you can also do Log and write text to log.txt, then look it up
10-06-2010 07:45 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #3
RE: Console for development
Yes i use the LogN already for logging but for realtime its not very handy. I will check it out with WIN API.
Yes with WIN API it works indeed, thnx! smile

There is always evil somewhere, you just have to look for it properly.
(This post was last modified: 10-06-2010 10:47 PM by Dynad.)
10-06-2010 10:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
zerooo Offline
Member

Post: #4
RE: Console for development
Hey, I am looking for the same solution.
I have been using Processing engine for my basic 2d and 3d graphics, but I recently switched to more powerful Esenthel engine and it looks very promising, but I miss the output window for my debugging needs, is there a simple way to std::cout or printf() from my functions at real time? Maybe, Dynad, you can post a solution with WIN API, I come from Java so I have a basic knowledge of c++ and never played with WIN API.
(This post was last modified: 10-11-2010 09:18 AM by zerooo.)
10-11-2010 09:10 AM
Find all posts by this user Quote this message in a reply
Masterxilo Offline
Member

Post: #5
RE: Console for development
@zerooo: Make sure windows.h and stdio.h are included, then just do:
Code:
AllocConsole(); freopen("CONIN$","rb",stdin); freopen("CONOUT$","wb",stdout); freopen("CONOUT$","wb",stderr);

And printf/cout/cin/scanf will work on the standard console again.
10-13-2010 02:00 AM
Visit this user's website Find all posts by this user Quote this message in a reply
zerooo Offline
Member

Post: #6
RE: Console for development
Thank you, Masterxilo, it works perfect, just had to use stdafx.h for entering windows.h and stdio.h or it won't compile (explained in documentation why)
stdafx.h:
Code:
#define NOMINMAX
#include <windows.h>
#include <stdio.h>
#include <EsenthelEngine/EsenthelEngine.h>
10-13-2010 10:49 AM
Find all posts by this user Quote this message in a reply
oggs91 Offline
Member

Post: #7
RE: Console for development
(10-13-2010 10:49 AM)zerooo Wrote:  Thank you, Masterxilo, it works perfect, just had to use stdafx.h for entering windows.h and stdio.h or it won't compile (explained in documentation why)
stdafx.h:
Code:
#define NOMINMAX
#include <windows.h>
#include <stdio.h>
#include <EsenthelEngine/EsenthelEngine.h>

Code:
#include "server.h"
#define NOMINMAX
#include <windows.h>
#include <stdio.h>
#include "../NetworkStuff/SimulationObject.h"
#include <EsenthelEngine/EsenthelEngine.h>

to get windows.h compiling, i added the #define NOMINMAX as mentioned before... but why do i need that define?
12-11-2010 03:25 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #8
RE: Console for development

There is always evil somewhere, you just have to look for it properly.
12-11-2010 03:36 PM
Visit this user's website Find all posts by this user Quote this message in a reply
oggs91 Offline
Member

Post: #9
RE: Console for development
(12-11-2010 03:36 PM)Dynad Wrote:  http://www.quantlib.co.uk/blog/what-does-nominmax-do

thank you Dynad!
12-13-2010 09:31 PM
Find all posts by this user Quote this message in a reply
Post Reply