preprocessor output

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
mcsummation
Posts: 220
Joined: 23 Jan 2012, 17:07
Location: Round Rock, TX

preprocessor output

Post by mcsummation »

Is it possible to get the preprocessor's output dumped to a file? (Especially when it gets an error.) I'm having troubles getting a macro to compile properly and I can't determine what the problem is. I know it's probably something simple, but with the stuff going on with token substitution, etc., it's hard to tell what the preprocessor is spitting out.
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: preprocessor output

Post by afanofosc »

Sometimes it is faster to just post your code. If you get a preprocessor error I don't you can get any kind of intermediate output. You can try -nbc=<filename> in the switches to see what it outputs.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: preprocessor output

Post by mattallen37 »

If you are using BCC, try pressing F12 after compiling the program.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
mcsummation
Posts: 220
Joined: 23 Jan 2012, 17:07
Location: Round Rock, TX

Re: preprocessor output

Post by mcsummation »

F12 gives the output of the NXC compiler that is the input to the NBC assembler.

John, I was trying to KISS, that's what led me off into the weeds.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests