Skip to content

Constants not defined during compilation #66

@FalcoGer

Description

@FalcoGer

I am trying to compile for an avr.micro and to use the HID-Project library.

When I try to compile with this CMake file

cmake_minimum_required(VERSION 3.0.0)

set(CMAKE_TOOLCHAIN_FILE "/home/user/repositories/arduino/Arduino-CMake-Toolchain/Arduino-toolchain.cmake")

set(ARDUINO_INSTALL_PATH "/home/user/repositories/arduino/arduino-ide/build")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

project (AH64MFDContorller CXX)

add_executable(AH64MFDContorller lnk/MFDController.cpp)

target_link_arduino_libraries(AH64MFDContorller PRIVATE HID HID-Project core)

set_target_properties(AH64MFDContorller PROPERTIES LINKER_LANGUAGE CXX)

target_enable_arduino_upload(AH64MFDContorller)

I get those errors

In file included from /home/user/Documents/Projects/arduino/AH64MFD/MFDController/lnk/MFDController.cpp:1:0:
/home/user/Documents/Projects/arduino/libraries/HID-Project/src/HID-Project.h:31:2: error: #error HID Project requires Arduino IDE 1.6.7 or greater. Please update your IDE.
 #error HID Project requires Arduino IDE 1.6.7 or greater. Please update your IDE.
  ^~~~~
/home/user/Documents/Projects/arduino/libraries/HID-Project/src/HID-Project.h:35:2: error: #error HID Project can only be used with an USB MCU.
 #error HID Project can only be used with an USB MCU.
  ^~~~~

However when I define them, I get warning about redefinitions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions