Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22001

Variable named i386 generated by Matlab Coder

$
0
0

I'm generating code for a function with several variable-sized arrays. The code needs to be compiled in both linux (with gcc) and windows machines (with MinGW).

To "ensure capacity" in those variables, Matlab creates several counter variables, named i349, i350, ..., i386, ... i400. Apparently, the windows compiler doesn't like this. It throws two errors that say :

line x: error: expected identifier or '(' before numeric constant

line y: error: lvalue required as left operand of assignment

line y+1: error: lvalue required as increment operand

These are all solved by manually picking other variable names. While I could use some script to automatically do so, I'd rather avoid it.

Two questions:

  1. Why does these variable names cause a problem with the compiler?

  2. How can I tell Matlab not to generate variables with these names?


Viewing all articles
Browse latest Browse all 22001

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>