c++ - Error "multiple definition of" when trying to make a mock library -


this may arduino specific because obvious solution have different make file. however, working team of people pretty green in ways of c++ , i'd not change current compile setup/workflow.

the goal

  1. have myclass defined in myclass.h , myclass.cpp uses hardware not developers have access @ times.
  2. have myclass defined in mock_myclass.h , mock_myclass.cpp defines exact same interface, sends output serial.
  3. not have move/rename files successful compile.

the problem

i have working except #3 above. if use #include "myclass.h" in code , for f in mock_myclass.*; mv $f $f.hide; done on command line, avoids error. use real hardware have reverse it. if have on command line, it'd easier overwrite symlinks... team members using windows. s#&$*^!!

the ask

can arduino ide ignore *.h , *.cpp files not #include-ed in sketch compiles fine change include?


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -