I have a project in which I have Library Course/CommandParser/libcli.a
Project Dir is : Course
When I am trying to create an executable by running the below command in 'Course' dir, it is giving me linking error.
g++ -g TcpClientDBManager.o TcpClientServiceManager.o TcpNewConnectionAcceptor.o TcpServerController.o network_utils.o TcpClient.o ByteCircularBuffer.o TcpMsgDemarcar.o TcpMsgFixedSizeDemarcar.o TcpMsgVariableSizeDemarcar.o testapp.o -o testapp.exe -lpthread -LCommandParser -lcli
/usr/bin/ld: testapp.o: in function `main':
/home/vm/src/TCPServerlib/Course/testapp.cpp:45: undefined reference to `init_libcli()'
/usr/bin/ld: /home/vm/src/TCPServerlib/Course/testapp.cpp:46: undefined reference to `start_shell()'
collect2: error: ld returned 1 exit status
The unreferenced functions belong to static library Course/CommandParser/libcli.a.
What wrong may I doing here that linking is failing ?
vm@ubuntu:~/src/TCPServerlib/Course$ ls CommandParser/libcli.a
CommandParser/libcli.a
init_libclifunction defined (implemented) in the library you link with? - Some programmer dude