I have linked a library, However, I get the following message. And can't seem to find out what the problem is. I have changed the arguments to 0 to see if that would make a difference. However, I am still getting the problem.
I also deleted the code inside CreateSocket to make it easy to finding what the problem is.
Many thanks for any advice on this problem,
steve@steve01:~/Projects/ClientApp/src$ g++ -o ../bin/client ClientApp.cpp -I ../include -L ../lib -lSocketFunctions
/tmp/cciZxGP6.o: In function `main':
ClientApp.cpp.text+0xc3): undefined reference to `CreateSocket()'
collect2: ld returned 1 exit status
My header file:
int SendData(int sockfd, char* buffer, int bytes);
char* SendAndReceiveData(int sockfd, char *buffer);
The program that uses the library.
/* Creates a new socket and return the sock file descriptor.*/
using namespace std;
int main(int argc, char** argv)
cout << "******* This is the client application ********" << endl;
cout << endl;
int sockfd = 0;
//Create a new socket
sockfd = CreateSocket();
cout << "sockfd: " << sockfd << endl;