Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in library #43

Open
jmezzera opened this issue Nov 19, 2019 · 11 comments
Open

Error in library #43

jmezzera opened this issue Nov 19, 2019 · 11 comments

Comments

@jmezzera
Copy link

Hi,

I'm trying to compile an example sketch which uses the Frame library and I'm getting a compilation error in the following line:

char valC[len][2] = {};

The error:

error: variable-sized object 'valC' may not be initialized
   char valC[len][2] = {};
                        ^

Any help would be appreciated.

@Libelium
Copy link
Owner

Hi,

Which example are you trying to compile?

Please check you're using the las API v43.

Regards

@jmezzera
Copy link
Author

Which example are you trying to compile?

Pretty much any piece of code that imports the library. For example:

#include <WaspFrame.h>;

void setup() {}
void loop() {}

Please check you're using the las API v43.

This might be it. Sorry for my ignorance, I'm just starting to develop with Waspmotes and Libelium. How can I make sure which version I'm running of how do I update to newer versions of the API? I downloaded the IDE a few days ago and I'm using it out of the box

Thanks a lot for the reply

@jmezzera
Copy link
Author

Now I'm sure I'm running v43, I downloaded the source code of the API, copied the library to the same folder as my project (just for testing purposes) and I even made some modifications on it to make sure the compiler was using that file. The error persisted. I'm going to keep trying.

@jmezzera
Copy link
Author

Even this code gives the same error

  int len = 4;
  char valC[len][2] = {};

@Libelium
Copy link
Owner

Hi, please try to download the IDE again, it already contains the las API version, we tested with your same code and we don't get that error.

Also please check it's not just a warning, File/Preferences/Compiler warnings -> None

Moreover, if you can test with another computer to discard any problem with yours.

Regards

@jmezzera
Copy link
Author

Thanks for the suggestions. However, none of those worked.

  1. I tried with a fresh install. No luck
  2. It's not a warning, it's an error
  3. I tried in a different machine (Windows) and the same error occured

Nevertheless, I tried in a Linux machine (I'm using Windows) and it worked. Could it be that the problem is in Windows installations only? In what OS did you try?

@Libelium
Copy link
Owner

Libelium commented Nov 22, 2019

Hi jmezzera,

It's weird, we tested the SmartDevice app Windows version some weeks ago.

Please fill the RMA form with the characterístichs of your OS and screenshots of the error and we will contact you in order to solve the problems with the SmartDevice app Windows version.

Regards

@jmezzera
Copy link
Author

Just to be sure, I'm not talking about the SmartDevice app, I'm trying to program a Waspmote PRO v1.5 board from the development kit through the Waspmote IDE.

The error I'm getting is while compiling the code, code that compiles in the linux version of the IDE.

Do you still want me to go through with the RMA?

Thanks

@Libelium
Copy link
Owner

Hi,
Did you put the switches of the board in the correct possition and select the correct COM port?

Please take a look in the following link where we explain the common issues to upload code with the IDE,
https://www.libelium.com/forum/viewtopic.php?f=51&t=22534

If still not working please share with us some screenshot of the error.

Regards

@jmezzera
Copy link
Author

Thank you for your suggestions.
I will try and summarize my problem. I'm having issues at compilation stage. I was trying to compile an example that uses WaspFrame library and could not compile it.

char valC[len][2] = {};

The error:

error: variable-sized object 'valC' may not be initialized
   char valC[len][2] = {};
                        ^

I tried some things:

  1. Reproducing the error without the library
  int len = 4;
  char valC[len][2] = {};

This did not compile in the IDE. However, this does in fact compile in the Arduino IDE. I'm not sure if this has anything to do, just a fact.

  1. Using another OS. The sketch does compile in the IDE on a Linux machine

Any thoughts on this matter? Can any of you confirm the code I posted in this comment does in fact compile on a Windows IDE?

Thank you very much

@Libelium
Copy link
Owner

Hi,

It's a weird issue. We have just tried to download the IDE in a Windows computer and compile a frame example and we haven't got a compiling error.

Please try to download the IDE again from the following link and let us know if it works.
http://downloads.libelium.com/waspmote-pro-ide-v06.17-windows.zip

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants