Jump to content
43oh

Libraries working in Energia 13 and also in arduino but not in Energia14


Recommended Posts

A very heartful thanks for the all the support.

I am using windows 7 32 bit os.
I had issues related to static ip which is solved in energia 14, but encountered a new issue.
My libraries are working fine in energia13 and also in arduino but not in energai14.
Below is the error it gives while compiling.
 
 
D:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\libraries\ActionCharts\ActionClient.cpp: In member function 'int ActionClient::post(ActionFeed&)':
D:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\libraries\ActionCharts\ActionClient.cpp:12:14: error: cannot declare variable 'http' to be of abstract type 'HttpClient'
   HttpClient http(_client);
              ^
In file included from D:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\libraries\ActionCharts\ActionClient.cpp:2:0:
D:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\libraries\HttpClient/HttpClient.h:37:7: note:   because the following virtual functions are pure within 'HttpClient':
 class HttpClient : public Client
       ^
In file included from D:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\libraries\ActionCharts/ActionFeed.h:5:0,
                 from D:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\libraries\ActionCharts/ActionCharts.h:3,
                 from D:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\libraries\ActionCharts\ActionClient.cpp:1:
D:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\cores\cc3200/Client.h:31:15: note: virtual int Client::sslConnect(const char*, uint16_t)
   virtual int sslConnect(const char *host, uint16_t port) = 0;
               ^
D:\energia-0101E0014-windows\energia-0101E0014\hardware\cc3200\cores\cc3200/Client.h:32:15: note: virtual int Client::sslConnect(IPAddress, uint16_t)
   virtual int sslConnect(IPAddress ip, uint16_t port) = 0;
               ^
 
 
Please guide!!!
Link to post
Share on other sites
Thanks for sending the libraries in an e-mail.

 

There is a backwards compatibility issue with sslConnect() that was added in Energia 14. The sslConnect() functions are declared as pure virtual. Since the ActionClient derived from Client does not implement sslConnect() compilation will fail. The solution is to offer a default empty implementation of sslConnect() in Client.h.

 

Please edit hardware/cc3200/cores/cc3200/Client.h and replace:



virtual int sslConnect(const char *host, uint16_t port);
virtual int sslConnect(IPAddress ip, uint16_t port);


with:



virtual int sslConnect(const char *host, uint16_t port){};
virtual int sslConnect(IPAddress ip, uint16_t port){};


Robert

Link to post
Share on other sites

Thanks for the help the client.h file I was having didnt had these lines as above so downloaded new client.h from and edited as instructed.

  virtual int sslConnect(const char *host, uint16_t port) = 0;
  virtual int sslConnect(IPAddress ip, uint16_t port) = 0;
 to 
  virtual int sslConnect(const char *host, uint16_t port){};
  virtual int sslConnect(IPAddress ip, uint16_t port){}; 
and it worked 
Thanks for the guidance!!!
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...