Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
What are these two files in the source of the template folder in the CE Toolchain? whenever I try to compile a file it fails because of printf.c. here is the code in question:

Code:

/*
 *--------------------------------------
 * Program Name:
 * Author:
 * License:
 * Description:
 *--------------------------------------
*/

/* Keep these headers */
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>

/* Standard headers (recommended) */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/* Put your function prototypes here */
void printText(const char *text, uint8_t x, uint8_t y);
/* Put all your globals here */

void main(void) {
   const char *HelloWorld = "Hello World";
   printText(HelloWorld, 0, 0);
}

/* Put other functions here */
void printText(const char *text, uint8_t xpos, uint8_t ypos) {
   os_SetCursorPos(ypos, xpos);
   os_PutStrFull(text);
}


EDIT: The error that shows is this:


Code:

C CE SDK Version 8.6
Z:\home\rohan\ceproject\src\printf.c
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (489,8) :       ERROR (100) Syntax error
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (490,15) :      ERROR (100) Syntax error
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (491,11) :      ERROR (100) Syntax error
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (491,16) :      ERROR (128) Identifier "F" not defined within current scope
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (492,10) :      ERROR (128) Identifier "conv" not defined within current scope
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (495,6) :       ERROR (100) Syntax error
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (495,13) :      ERROR (128) Identifier "exp2" not defined within current scope
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (496,28) :      ERROR (19) Character not within radix
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (498,6) :       ERROR (100) Syntax error
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (498,15) :      ERROR (128) Identifier "expval" not defined within current scope
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (501,8) :       ERROR (100) Syntax error
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (501,20) :      ERROR (128) Identifier "z" not defined within current scope
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (502,8) :       ERROR (100) Syntax error
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (502,20) :      ERROR (128) Identifier "z2" not defined within current scope
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (503,22) :      ERROR (128) Identifier "uint64_t" not defined within current scope
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (513,11) :      ERROR (100) Syntax error
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (513,26) :      ERROR (128) Identifier "minwidth" not defined within current scope
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (539,11) :      ERROR (100) Syntax error
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (539,24) :      ERROR (128) Identifier "fwidth" not defined within current scope
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (558,8) :       ERROR (100) Syntax error
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (558,6) :       WARNING (222) Statement has no effect
Z:\HOME\ROHAN\CEPROJECT\SRC\PRINTF.C    (569,31) :      ERROR (128) Identifier "start_idx" not defined within current scope
make: *** [/home/rohan/CEdev/include/.makefile:204: obj/printf.src] Error 255

Don't use them if you don't know how to use them.
MateoConLechuga wrote:
Don't use them if you don't know how to use them.


Darn, I guess I'm not allowed use C at all then 😂
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement