Having trouble compiling

#include <p18cxxx.h>
#include <stdlib.h>
#include <stdio.h>

#pragma config WDT = OFF

void main (void)
{
TRISB = 0;

/* Reset the LEDs */
PORTB = 0;

/* Light the LEDs */
PORTB = 0x5A;
printf(“heloo world! /n”);

while (1)
;
}
//…output window
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: “C:\mcc18\bin\mcc18.exe” -p=18F8520 “C:\New Folder\main.c” -fo=“main.o” -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
MPLAB C18 v2.40 (demo)
Copyright 1999-2004 Microchip Technology Inc.
Days remaining until demo becomes feature limited: 51
C:\New Folder\main.c:16:Warning [2066] type qualifier mismatch in assignment
Executing: “C:\mcc18\bin\mplink.exe” /l"C:\mcc18\lib" “C:\vex\wild goose\use\18f8520.lkr” “C:\vex\wild goose\one\main.o” “C:\vex\wild goose\use\p18f8520.lib” /o"two.cof" /M"two.map" /W
MPLINK 3.90, Linker
Copyright © 2004 Microchip Technology Inc.
Error - could not find definition of symbol ‘printf’ in file ‘C:\vex\wild goose\one\main.o’.
Errors : 1

Link step failed.
BUILD FAILED: Wed Jul 04 12:24:48 2007

According to the printout from the compiler it can’t find the “printf” command. What are you trying to compile this in EasyC?

I think he is using MPLab

Try this


printf("Hello, world!\n");

yes, mplab.
I found this example.
I thought I could simulate.

What exactly are you trying to have happen?

oscar, go to the downloads section of the vex labs site, and download the “Vex Starter Code” zip file. Extract it and open the workspace file located among the extracted files. Inside will be code that compiles, from there you can modify it to do what you want.

I have the starter code. There is so much going on…I was hoping for somthing a little more simplified than that. Im just looking for a few simople examples of how to interact with the vex from my laptop.
which ports do what, and how to read and invoke them.
Ive looked everywhere, but Im just getting more confused.
Im pretty familiar with C, but a newbie to robotics.
Please direct.
Thank you.

What is Wait4TXEmpty() ??

…anyone?

:confused: bump

Could you post all of the code that has that line?
Also, if you go into one of the header files (.h) you should see a section where all of the functions are defined, it should look something like this.


void FunctionName ( int parameter ) ;
unsigned char Function_Name ( int parameter, unsigned char parameterTwo, int parameterThree ) ;
void Another_Function ( void ) ;

This will just give more information about the function. It helps …

[rant].h is a C Header file…[/endrant]

I think the problem here is that you are using stdio.h. Download the starter code (if you don’t already have it) and find prinf_lib.h and printf_lib.c. Add those files to your project after removing stdio.h.

Also, could you be a little more specific on your objective? Are you simply trying to print information about motors/variables/sensors to the terminal window in MPLab, or is it more complicated than that?

Hope this helps!