Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Setting up an additional console for std I/O
No permission to create posts
July 31, 2013
3:15 pm
Avatar
WilliamR
Member
Members
Forum Posts: 6
Member Since:
July 31, 2013
sp_UserOfflineSmall Offline

Hi,

first of all, I realy like book. I didn't think, it would be able to get into DSP so fast. But for the next time, an optional hard cover would be great. (People would spend the money on that.) :)

To the topic. I am not the best C++- Programmer. I am currently studying CS in Germany but we only had Java and C so far and only the basics of programming. Right now, in Chapter 7, I start making some funny mistakes while programming and I would realy like to have an additional output-console wich I can use with in the project.

Is there a simple way to do this? For example a bit of code i write in the constructor wich opens a console in the background?

William

PS: I hope my english is not that bad. ;)

August 1, 2013
1:42 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

Hi William -

Glad you are enjoying the book!

RackAFX has a built-in Debug Window called the "Status Window" that you can send strings to from anywhere in your code EXCEPT the constructor. This makes it easy to send these messages directly into RackAFX. You can get details about how to use the Status Window on the Tips page here:

http://www.willpirkle.com/tips.....icks/#TIP7

If you want to use something similar to TRACE (a macro only available with MFC - RackAFX plug-ins do not use MFC for several reasons; first, to be lean and secondly to be as compatible as possible with XCode/MacOS). If you want to use a similar macro, add the following code to the top of your .cpp file (NOTE: you will need to remove this (or comment it out) and all references to it if you use the Export To AU and compile in XCode.)

Get the code from here (its the first answer)

http://stackoverflow.com/quest.....ic-win32-c

You can then use it like this:

TRACE("This is a debug message!\n");

The \n forces a carriage return (new line). The message appears in the Output Window in Visual Studio.

You can also use the helper functions I describe on the Tips page above to do things like convert ints and floats to strings or concatenate strings; then you can use the TRACE macro above to log them.

I have used a custom console window in the past, but it was a pain and very slow; it used Windows Pipes to send text. I don't remember the name of the debug window app, though Frown Anyone else have a console debug logger that works with Win32 (and not MFC)? If so, please post it here!

The Status Window and/or TRACE macro should help you out with your debugging.

- Will

August 1, 2013
4:41 am
Avatar
WilliamR
Member
Members
Forum Posts: 6
Member Since:
July 31, 2013
sp_UserOfflineSmall Offline

Well, that is exaclty what I am looking for. :) Sorry that i missed the Status Window in the first place but better later than never.

I should propably take a break for today, it is 2:00 am over here. ;)

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 477

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 483

Posts: 1877

Newest Members:

Jaggxn, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143