Electro-resonance / Through-hole-braided-DAC

Improvements to the DAC code for the Braids Through-hole – SoundForce module
MIT License
4 stars 1 forks source link

error: 'char_index_' was not declared in this scope #1

Open sebastianbeyer opened 1 year ago

sebastianbeyer commented 1 year ago

Hey :) When I try to compile I get this error:

braids/drivers/display.cc: In member function 'void braids::Display::Refresh()':
braids/drivers/display.cc:74:5: error: 'char_index_' was not declared in this scope
     char_index_ = static_cast<uint8_t>(buffer_[active_position_]);

I copied your files over into the mutable dev environment. If I try to define char_index_ in display.h, I get

build/braids/ui.o: In function `stmlib::RingBuffer<stmlib::Event, 16u>::Flush()':
/vagrant/eurorack-modules/braids/ui.cc:41: multiple definition of `braids::char_index_'
build/braids/braids.o:/vagrant/eurorack-modules/./braids/drivers/adc.h:42: first defined here
build/braids/display.o: In function `braids::Display::Print(char const*)':
/vagrant/eurorack-modules/braids/drivers/display.cc:49: multiple definition of `braids::char_index_'
build/braids/braids.o:/vagrant/eurorack-modules/./braids/drivers/adc.h:42: first defined here
collect2: error: ld returned 1 exit status

Could you help me out? :)

Electro-resonance commented 11 months ago

I checked and charindex variable is already defined in the Mutated-Mutables header file: https://github.com/timchurches/Mutated-Mutables/blob/master/braids/drivers/display.h

The changes described were at the time tested against the Mutated-Mutables environment: https://github.com/timchurches/Mutated-Mutables