End of source file reached without closing comment */ symbol        - Page 1
Forum section: electronics / general

author: radhika
author_rank: Regular Contributor
timestamp: June 18, 2019, 05:32:11 pm
content: Hello,I build a code and i got hex file but after some time i again compile it, i get this error.End of source file reached without closing comment */ symbolLook to this code and guide me that where i am wrong.Code:#include "18F4520.h"#include <SSD1306.c>#define adc=10#define SSD1306_RST PIN_D4#fuses HS,NOWDT,NOPROTECT,NOLVP#use delay(clock=8000000)#use I2C(MASTER, I2C1, FAST = 400000, stream = SSD1306_STREAM) // Initialize I2C#define sclk PIN_D2#define sdata PIN_D3#define cs1 PIN_D1#define cs2 PIN_D0static int8 i = 0, j=1;volatile unsigned long button_select, button_up, button_down;uint8_t row_Ind, col_Ind;int m1, m2, m3, m4;// menu select indexuint8_t start_row;unsigned int pwm1;void SendPotValue (unsigned short num);void senddac1 (unsigned int dac1);void senddac2 (unsigned int dac2);char *ADC = "0000";unsigned int aa;const char MESSAGE[] = "VOLUME:";uint8_t const starting_row = 1;uint8_t const starting_col = 3;int spkr = 0;void cursor(uint8_t index); // move cursor to the xth row and first columnvoid menu1 ();void charging_s1();void charging_AC();void charging_Solr();void discharging_s1();void discharging_USB();void discharging_DC();void discharging_AC();void discharging_Spkr();void spkr_Vol();void menu1_Back();void charging_s1_Back();void discharging_s1_Back();void spkr_Back();void scroll_down();

author: Yansi
author_rank: Super Contributor
timestamp: June 18, 2019, 05:48:51 pm
content: Syntax error well may be within any of these two files:#include "18F4520.h"#include <SSD1306.c>Which one of these two have you poked last time?Also, including a C file sound kind of weird. You sure what ya doin?

author: radhika
author_rank: Regular Contributor
timestamp: June 18, 2019, 05:56:38 pm
content: Quote from: Yansi on June 18, 2019, 05:48:51 pmNow I use it like this,#include <18F4520.h>#include <SSD1306.c>Ya. It's microcontroller coding with oled display ssd1306

author: Wilksey
author_rank: Super Contributor
timestamp: June 18, 2019, 06:30:24 pm
content: It would help us to help you if you post your full source, I see function prototypes but no functions.

author: TK
author_rank: Super Contributor
timestamp: June 18, 2019, 08:08:35 pm
content: Check the files you are including, probably the error is in there.Also, do not include .c files. If the .c file is from a library, it is probable that it has a .h file associated with it. You include that .h file and compile both .c files (your file and the library file) and then the linker will combine both objects and generate one simple firmware file

author: radhika
author_rank: Regular Contributor
timestamp: June 19, 2019, 03:19:25 am
content: Quote from: Wilksey on June 18, 2019, 06:30:24 pmThe code is so big. It's error free. But the only error i get is this.

author: radhika
author_rank: Regular Contributor
timestamp: June 19, 2019, 03:20:58 am
content: Quote from: blueskull on June 18, 2019, 06:42:40 pmI don't even used */ this in whole codde. I only used // this. But I dont know what this error indicate.

author: radhika
author_rank: Regular Contributor
timestamp: June 19, 2019, 03:34:59 am
content: Quote from: TK on June 18, 2019, 08:08:35 pmI made these changes, and i m still getting this errorCode:#include "18F4520.h"#include <stdint.h>#define SSD1306_RST PIN_D4#fuses HS,NOWDT,NOPROTECT,NOLVP#use delay(clock=8000000)#use I2C(MASTER, I2C1, FAST = 400000, stream = SSD1306_STREAM) // Initialize I2C#define sclk PIN_D2#define sdata PIN_D3#define cs1 PIN_D1#define cs2 PIN_D0// Include SSD1306 OLED driver source code#include <ssd1306.c>

author: TK
author_rank: Super Contributor
timestamp: June 19, 2019, 03:40:29 am
content: Can you attach ssd1306.c?

author: radhika
author_rank: Regular Contributor
timestamp: June 19, 2019, 03:51:39 am
content: Hello, people thanks for replying and guiding. There is */ missing in SSD1306.c file. I made i correct and code hass compiled