1

I am working in an Arduino project in visual studio. I need to get and set time to a RTC clock. That's why I am adding a ds3231 header file in my project from GitHub. When I want to build "it's showing me linking error.

cccSeqVu.ltrans0.o*: (.text.startup+0x1ea): undefined reference to DS3231_init(unsigned char)

My code is given below.

 #include <Wire.h>
 #include "ds3231.h"
 
 void setup(){
 Wire.begin();
 DS3231_init(0x4);
 }
 
 void loop(){
 }

Can anyone please help me to find out what I have missed.

asked Jan 8, 2023 at 15:21
3
  • add the whole library, not just the header file Commented Jan 8, 2023 at 15:32
  • How to add the whole library in visual studio? Commented Jan 8, 2023 at 15:38
  • I don't know. I don't use platformio Commented Jan 8, 2023 at 15:46

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.