# undefined reference to `GMOUSEVMT_OnlyOne'

## Recommended Posts

Arduino Due with RA8875 SPI LCD and FT5206 capacitive touchscreen driver.

The RA8875 is working fine, I tried adding support for touch input:

1.  I initialed the FT5206 controller and read the touch coordinates independently from uGFX without an issue (using I2C commands directly), so the hardware is working.

2. I added  gmouse_IId_FT5x06.c and gmouse_IID_FT5x06_board.h  to gfx\ugfx\drivers\ginput\touch\FT5x06

3. I added under gfx  driver_FT5x06.c (That's where my other working driver_RA8875.c file is) with a single line pointing to the above #include "ugfx/drivers/ginput/touch/FT5x06/gmouse_lld_FT5x06.c".

4. I have a #define GMOUSE_DRIVER_VMT        GMOUSEVMT_FT5x06 in gmouse_IID_FT5x06_board.h

5. I set both GFX_USE_GINPUT  and GINPUT_NEED_MOUSE to true in gxfconf.h

When I build, I get:

libraries\gfx\gfx.c.o: In function `_gmouseInit':

<...>\Documents\Arduino\libraries\gfx\ugfx/src/ginput/ginput_mouse.c:653: undefined reference to `GMOUSEVMT_OnlyOne'

After searching and reading through the threads, the general reason behind this error is usually that I enabled the mouse input, but didn't define/add files for the driver/board. I believe that I did, but I am sure I missed something in the process.

I looked at ugfx\boards\addons\ginput\touch and there seem to be an MCU and ADS7843 folders there, since I could not find any documentation, I tried creating an FT5x06 folder there and putting my board.h file there, but how do I include it in the build(like done in step 3. above).

Any help would be appreciated. Thanks,

Wahran.

##### Share on other sites
On 12/20/2017 at 20:42, chankour said:

2. I added  gmouse_IId_FT5x06.c and gmouse_IID_FT5x06_board.h  to gfx\ugfx\drivers\ginput\touch\FT5x06

Be careful with upper and lower case mixing in the llD/lld. The gmouse_lld_FT5x06.c file is already written in present in that folder. Any reason why you are rewriting it? You should only have to write the board file.

On 12/20/2017 at 20:42, chankour said:

3. I added under gfx  driver_FT5x06.c (That's where my other working driver_RA8875.c file is) with a single line pointing to the above #include "ugfx/drivers/ginput/touch/FT5x06/gmouse_lld_FT5x06.c".

Is gfx the root folder of the µGFX library? Because you should not inlcude files this way. Normally you include source files and headers files through you IDE or your makefile.

On 12/20/2017 at 20:42, chankour said:

4. I have a #define GMOUSE_DRIVER_VMT        GMOUSEVMT_FT5x06 in gmouse_IID_FT5x06_board.h

This is already defined in the gmouse_lld_FT5x06.c file. You should not redefine it as it will give you errors like the one you are getting now.
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8359867930412292, "perplexity": 3686.360459061917}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-51/segments/1544376823183.3/warc/CC-MAIN-20181209210843-20181209232843-00296.warc.gz"}