Hello,
I am getting undefined referance to error in my esp32 project
below is my project sturture
VWDIHD
├── components
| ├── ZIGbeeSDK
│ └── platform
│ └── inc
| | |- abc.h file extern uint16_t ashAckTimer;
| | #define ashStopAckTimer() do { ashAckTimer = 0; }
│ └── SRC
| | |- abc.c file uint16_t ashAckTimer; //
│ └── CMakeLists.txt
| SRC "abc.c"
| INCLUDE_DIRS "/inc"
├── main
│ └── CMakeLists.txt [init point]
|
|- CMakeLists.txt
the error i am getting is
undefined reference to `ashAckTimer'
FYI : kept header file in source "abc.c" file
Kindly let me know the reason
using espidf v5.4.1 with zigbee SDK4.4.6
Attached a image of projet where getting error
Kindly let me know the reasons
Getting ": undefined reference to " error in project directory
-
kesha.modhia
- Posts: 53
- Joined: Fri May 13, 2022 12:36 pm
Getting ": undefined reference to " error in project directory
- Attachments
-
- aaCapture.PNG (13.71 KiB) Viewed 81 times
-
MicroController
- Posts: 2663
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Getting ": undefined reference to " error in project directory
From what you show I'm pretty sure there are more errors and/or warnings put out by the build process, which are relevant.
As a start, change
to
in the CMakeLists.txt.
As a start, change
Code: Select all
SRC "abc.c"
INCLUDE_DIRS "/inc"
Code: Select all
SRC "SRC/abc.c"
INCLUDE_DIRS "inc"
-
kesha.modhia
- Posts: 53
- Joined: Fri May 13, 2022 12:36 pm
Re: Getting ": undefined reference to " error in project directory
Yes, I already have written that as you suggested
VWDIHD
├── components
|-----├── ZIGbeeSDK
│ └── platform
│ └── inc
| |- abc.h file extern uint16_t ashAckTimer;
| | #define ashStopAckTimer() do { ashAckTimer = 0; } while (false)
│ └── SRC
| |- abc.c file uint16_t ashAckTimer; //
│ └── CMakeLists.txt
| SRC "SRC/abc.c"
| INCLUDE_DIRS "inc"
├── main
│ └── CMakeLists.txt [init point]
|
|- CMakeLists.txt [set(EXTRA_COMPONENT_DIRS components/ZigbeeSDK )]
For your information my project directory looks like attached image,
Above given is just small represantation of my issue so that i can explain you clearly.
Attached CMakelist.txt of platform for better understanding.
VWDIHD
├── components
|-----├── ZIGbeeSDK
│ └── platform
│ └── inc
| |- abc.h file extern uint16_t ashAckTimer;
| | #define ashStopAckTimer() do { ashAckTimer = 0; } while (false)
│ └── SRC
| |- abc.c file uint16_t ashAckTimer; //
│ └── CMakeLists.txt
| SRC "SRC/abc.c"
| INCLUDE_DIRS "inc"
├── main
│ └── CMakeLists.txt [init point]
|
|- CMakeLists.txt [set(EXTRA_COMPONENT_DIRS components/ZigbeeSDK )]
For your information my project directory looks like attached image,
Above given is just small represantation of my issue so that i can explain you clearly.
Attached CMakelist.txt of platform for better understanding.
- Attachments
-
- main_CMakeLists.txt
- (678 Bytes) Downloaded 11 times
-
- platform_CMakeLists.txt
- (7.48 KiB) Downloaded 7 times
-
- projectCapture.PNG (21.47 KiB) Viewed 59 times
Who is online
Users browsing this forum: Barkrowler, Bytespider, Google [Bot], Perplexity-User, PerplexityBot, PetalBot and 2 guests