Skip to content

problem building on debian 12 (gcc 12.2) #4

@openhacker

Description

@openhacker

Not sure why it worked before -- building on debian 12 I see:

gcc -o ADT7301 ./Demo/Demo_ADT7301/ADT7301.c -L ./BBBio_lib/ -liobb
gcc -o SevenScan ./Demo/Demo_SevenScan/SevenScan.c -L ./BBBio_lib/ -liobb
gcc -o SMOTOR ./Demo/Demo_ServoMotor/ServoMotor.c -L ./BBBio_lib/ -liobb
/usr/bin/ld: ./BBBio_lib//libiobb.a(BBBiolib_PWMSS.o):(.bss+0x0): multiple definition of `cm_per_addr'; ./BBBio_lib//libiobb.a(BBBiolib.o):(.bss+0x1c): first defined here

Looking at the coding style, its a good idea to not have externs in C files but have them all in header files that are included.

The following patch solves the problem:

cm_per_addr.patch.txt

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