Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Am I using an old Compiler? Memcpy not working (Read 667 times)
LaVolpe
Newbies
*
Offline


Posts: 1
Joined: Apr 2nd, 2020
Am I using an old Compiler? Memcpy not working
Apr 2nd, 2020 at 7:11pm
Print Post  
Hi there,

I recently started using Visual Micro for my Arduino Development.

I have 2 possibly related problems. Both of the following examples compile perfectly within the original Arduino IDE.

1. 
Code (C++)
Select All
int x;
int temp[x];

 



In Visual Studio I have to use this, because it claims that x needs to be a constant.

Code (C++)
Select All
short* tempBuffer = new short[sampleCount];

 



2. Problem

Code (C++)
Select All
void copy(int* src, int* dst, int len) {
    memcpy(dst, src, sizeof(src[0]) *len);
                            
}
 



This also doesn't compile: "no instance of overloaded function "memcpy" matches the argument list" , while the arduino ide just compiles this.

So my theory is that I'm using some super old compiler and that is why this wont work. 

Since I Installed it all freshly today, you can assume I have the current Version of Visual Micro

Thanks for your help.
« Last Edit: Apr 2nd, 2020 at 7:21pm by LaVolpe »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Am I using an old Compiler? Memcpy not working
Reply #1 - Apr 2nd, 2020 at 7:21pm
Print Post  
The visual studio intellisense system is not directly connected to the compiler therefore some errors you report might just be intellisense errors which we can look into after the compilation issue.

Please follow the guide in yellow at the top of the page.
« Last Edit: Apr 2nd, 2020 at 7:21pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint