My problem about include my private head files



  • I already include the path of my libraries as follow
    0_1581443760898_1b6b1834-adb8-4a06-9470-9173840013c4-image.png

    I also include the head file of lcd and camera in my main.c file
    0_1581444348753_5b39a2ef-0d78-4123-a7aa-c6054b2e13dc-image.png

    But the IDE said the lcd_init() function was undefined as follow when i want to compile whole project.(the lcd_init()function is defined in the lcd.c file)
    0_1581443901048_4d2e3868-6d52-46c6-bbf7-bd43954a0463-image.png

    I also have checked my CMakeList.txt file as show as below. Obviously, the path of two head files has been include.
    0_1581444377815_953a3e36-f92a-4dd9-957e-2d33fa113ee1-image.png

    I am very confusing now and can you help me?



  • @MangoGeek
    Wow! The compiler is working without any errors ! Thank you so much!



    1. Check CMakeLists.txt line:221
    ## add source from config json (5 files matched)
    add_source_file(src/lcd.c)
    add_source_file(src/main.c)
    

    If the project is correct, your source path should be in this part.
    if there is not, see 2

    1. Check kendryte-package.json, your source path should in :
        "source": [
            "src/*.c"
        ],