I am developing a project using FreeRTOS. I need TCP functions which I include from FreeRTOS+TCP. This is the relevant part of my code:
#include "FreeRTOS.h"
#include "FreeRTOS_IP.h"
#include "FreeRTOS_Sockets.h"
void tcp_send_task() {
FreeRTOS_IPInit(NULL, NULL, NULL, NULL, NULL);
}
And I get the following error in main.obj:
LNK2019 unresolved symbol _FreeRTOSIPInit in function _tcp_send_task
I followed the instructions in the following link: https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_Networking_Tutorial_Adding_Source_Files.html
In Project -> Properties -> C/C++ -> Other include Drectories
I have the following paths:
..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\NetworkInterface\WinPCap;
..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP;
..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\Compiler\MSVC;
..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\BufferManagement;
..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include;
..\..\Source\include;
..\..\Source\portable\MSVC-MingW;
..\Common\Include;
..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-Trace\Include;
.\Trace_Recorder_Configuration;
.;%(AdditionalIncludeDirectories)
All the necessary .h and .c files are in the include paths, but I think the function declaration is found, but not the definition.
I also tried adding the .c file path to Properties -> Configuration -> Linker -> Additional Library Directories
, but it didn't solve the problem.