hello,
This is Milav Soni from Teq Diligent,India.
I defined function pointer in header file(Adafruit_GFX.h) like this .. // function pointer for drawPixels typedef void (*DrawPixelHandler)(int16_t x, int16_t y, uint16_t color) ; DrawPixelHandler _drawPixel;
In main file i include Adafruit_GFX.h file.
than during build it give following error.
-------------------------------------------------------------------------------------------- *** Using Compiler 'V5.05 update 2 (build 169)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' Rebuild target 'Target 1' compiling main.c... compiling Adafruit_GFX.c... compiling glcdfont.c... glcdfont.c(8): warning: #177-D: variable "font" was declared but never referenced static unsigned char font[] = { glcdfont.c: 1 warning, 0 errors assembling arm_startup_nrf51.s... compiling system_nrf51.c... linking... .\Objects\cfx.axf: Error: L6200E: Symbol _drawPixel multiply defined (by adafruit_gfx.o and main.o). Not enough information to list image symbols. Not enough information to list the image map. Finished: 2 information, 0 warning and 1 error messages. ".\Objects\cfx.axf" - 1 Error(s), 1 Warning(s). Target not created. Build Time Elapsed: 00:00:01
--------------------------------------------------------------------------------------------
where is a problem?
Thank You Milav
HAY MILAV SONY.
YOU NEED TO CHECK YOUR SOURC CODE. _drawPixel IS DEFIND IN MAIN UND ADAFRUIT_GFX.
I defined function pointer in header file
And that's precisely your problem: you defined the pointer variable, instead of just declaring it. Learn about the difference in your C textbook.
Please pay attention to the simple, clearly-stated instructions for posting source code - look at this picture:
www.danlhenry.com/.../keil_code.png