This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3100BOOST: CC3100 HTTP Client Dependency Issue

Part Number: CC3100BOOST
Other Parts Discussed in Thread: CC3100SDK, CC3100, MSP430F5529

Hi

I am trying to use HTTPCli in my project, but cannot get it to compile due to a dependency / linking issue

in the project properties, I have added an  #include path

"C:\TI\CC3100SDK_1.3.0\cc3100-sdk\netapps"

then in my c file, I have

#include "http/client/httpcli.h"

Compiling gives undefined references to various httpcli functions that are called in my source file. The project can see the header file httpcli.h and the declarations. But I don't think it can see the c file.

Description Resource Path Location Type
undefined reference to `HTTPCli_connect' wifi.c /WiredThermostat/Sources line 699 C/C++ Problem
undefined reference to `HTTPCli_construct' wifi.c /WiredThermostat/Sources line 698 C/C++ Problem
undefined reference to `HTTPCli_destruct' wifi.c /WiredThermostat/Sources line 728 C/C++ Problem
undefined reference to `HTTPCli_disconnect' wifi.c /WiredThermostat/Sources line 727 C/C++ Problem
undefined reference to `HTTPCli_getResponseField' wifi.c /WiredThermostat/Sources line 786 C/C++ Problem
undefined reference to `HTTPCli_getResponseField' wifi.c /WiredThermostat/Sources line 846 C/C++ Problem
undefined reference to `HTTPCli_getResponseField' wifi.c /WiredThermostat/Sources line 971 C/C++ Problem
undefined reference to `HTTPCli_getResponseStatus' wifi.c /WiredThermostat/Sources line 772 C/C++ Problem
undefined reference to `HTTPCli_getResponseStatus' wifi.c /WiredThermostat/Sources line 832 C/C++ Problem
undefined reference to `HTTPCli_readResponseBody' wifi.c /WiredThermostat/Sources line 813 C/C++ Problem
undefined reference to `HTTPCli_readResponseBody' wifi.c /WiredThermostat/Sources line 885 C/C++ Problem
undefined reference to `HTTPCli_readResponseBody' wifi.c /WiredThermostat/Sources line 986 C/C++ Problem
undefined reference to `HTTPCli_sendRequest' wifi.c /WiredThermostat/Sources line 764 C/C++ Problem
undefined reference to `HTTPCli_sendRequest' wifi.c /WiredThermostat/Sources line 824 C/C++ Problem
undefined reference to `HTTPCli_setRequestFields' wifi.c /WiredThermostat/Sources line 759 C/C++ Problem
undefined reference to `HTTPCli_setResponseFields' wifi.c /WiredThermostat/Sources line 783 C/C++ Problem
undefined reference to `HTTPCli_setResponseFields' wifi.c /WiredThermostat/Sources line 843 C/C++ Problem
undefined reference to `HTTPCli_setResponseFields' wifi.c /WiredThermostat/Sources line 968 C/C++ Problem
undefined reference to `HTTPCli_setResponseFields' wifi.c /WiredThermostat/Sources line 982 C/C++ Problem

If I bring the netapps directory into my project, so the source files are compiled, then I get an error when compiling httpsend.c. The error is #include <ti/net/http/httpsrv.h> (Line 38 of httpsend.c)

Doing a search, the file httpsrv.h doesn’t exist in the CC3100 SDK.

Could you give me any tips on getting this working. Which method above is correct? Should I be including the source files in my project, or just linking to them?

I also have the following preprocessor #defines

__SL__

HTTPCli_LIBTYPE_MIN

  • Hi Gavin,

    You are on the right track with adding the source to the project. The undefined reference will occur if the application tries to use the API without the source included in the project or a static library build of the source linked to the project.

    However, you shouldn't need all the content in the netapps folder. It looks like you are just trying to implement the HTTP client. I recommend you try importing the MSP430F5529 http_client example into CCS and taking a look at how that is built. The example pulls in the http_lib content that is needed for the example when you import it. From there, you should see the files you need to complete your build.

    Best Regards,
    Ben M
  • Good afternoon Ben

    Thanks for your suggestion.

    You're right, it looks like importing httpcli and ssock into the project was enough to allow it to compile correctly.

    Thanks for your help