Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Multiple Definition Error Not fixed by swapping src_cpp or src_h with src #9

Closed
WillPowellUk opened this issue Nov 25, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@WillPowellUk
Copy link

Please see the stack overflow question I posted on this bug. I have tried switching the src_cpp and src_h but the SAMDTimerInterrupt.h files are identical on all 3!

I have tried a forward declare and including it as a cpp file instead of a header file but no luck.

Please could you adjust the src_cpp or src_h files to prevent this linker error

P.s. apart from this, the library is amazing and I am thankful for your work :)

@khoih-prog
Copy link
Owner

Hi @will63powell

Thanks for your interest in the library and your nice words.

Check the previous issue The src_cpp->src/src_h->src hack from the README will not avoid multiple definitions when SAMD_TimerInterrupt.h is included in multiple project files. #8

Good Luck,

@khoih-prog khoih-prog added the wontfix This will not be worked on label Nov 25, 2021
@WillPowellUk
Copy link
Author

Thanks for the quick reply. I have split the .h file into a .cpp and .h (attached)
Can you upload this to the SAMD_TimerInterrrupt/SRC_CPP for others to use as currently there is no .cpp for SAMDTimerInterrupt
SAMDTimerInterrupt.zip
?

@khoih-prog
Copy link
Owner

Hi @will63powell

The new SAMD_TimerInterrupt releases v1.6.0 has just been published thanks to your bug report.

Your contribution is noted in Contributions and Thanks.

Best Regards,


Releases v1.6.0

  1. Fix multiple-definitions linker error. Drop src_cpp and src_h directories
  2. Add example multiFileProject to demo for multiple-file project.
  3. Add support to many more boards, such as SAMD21E1xA, SAMD21G1xA andSAMD21J1xA
  4. Optimize library code by using reference-passing instead of value-passing
  5. Update all examples
  6. Update Packages_Patches

@WillPowellUk
Copy link
Author

WillPowellUk commented Jan 21, 2022 via email

@khoih-prog khoih-prog added enhancement New feature or request and removed wontfix This will not be worked on labels Jan 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants