undefined reference

Hello everyone I hope you are well,

I am trying to use e-paper screen with pca10040 devkit however,

I would like to ask a question about how can I fix undefined reference to `nrf_gfx_init' problem

I take the nrf_gfx.h and .c file into a a file which I named it  external libraries but .c file looks pale written 

I think something goes wrong while inserting functions.

If anyone can help I would be really grateful.

  • An issue caused by unfortunate obfuscation choices, use of ## and so on; one reason (in my view) why the SDK was abandoned.

    The likely cause of the error is "NRF_GFX_ENABLED" in sdk_config.h being '0', simply change it to '1'.

     Directory of D:\Projects\Nordic\nRF5_SDK_17.1.0_ddde560\examples\ble_central\ble_app_hrs_c\pca10040\ser_s132_hci\config
    sdk_config.h
    // <q> NRF_GFX_ENABLED  - nrf_gfx - GFX module
    #ifndef NRF_GFX_ENABLED
    #define NRF_GFX_ENABLED 0

    Finding this and other similar issue can be a pain: I use a batch search script along these lines:

    local
    rem: Project Source File Search Utility
    rem:
    rem: Author - Hugh
    rem:
    rem: "find" can get lost, use specific path
    SET path=C:\Windows\System32\;%path%
    rem:
    rem: Setup output file and initialise it
    set OutputFile=f.txt
    @echo f1.bat output                  > %OutputFile%
    for /R %%f in (sdk_config.h) DO (
    dir /W %%f | find /I "examples"     >> %OutputFile%
    dir /B %%f                          >> %OutputFile%
    type %%f | find /I "gfx"            >> %OutputFile%
    )
    rem: To search all source files use something like this:
    rem: for /R %%f in (*.c *.h *.eww *.ewp *.uvmpw *.uvproj *.xml *.emProject) DO (
    

Related