VS Arduino
Visual Micro >> Visual Studio 2017, 2019, 2022 >> Project reference
https://www.visualmicro.com/forums/YaBB.pl?num=1561994989

Message started by Jesper on Jul 1st, 2019 at 3:29pm

Title: Project reference
Post by Jesper on Jul 1st, 2019 at 3:29pm
Hi
I have a project that I can compile in Arduino IDE without any problems, but when I open it in VS2019 I get a lot of faults with references and functions that it says that there are defined and cannot resolve symbol.

Again I can compile and download to the controller from Arduino without any problems. so what do I wrong with Visual Micro.
The project is https://github.com/mtz8302/AG_GPS_ROOF_UNIT_ESP32

Title: Re: Project reference
Post by Visual Micro on Jul 1st, 2019 at 4:11pm
Hi,

It's important to distinguish if we are looking at an intellisense issue or build issue.

Please follow the guide in yellow at the top of this page so we can see which tool chain and other info.

Thanks

Title: Re: Project reference
Post by Jesper on Jul 1st, 2019 at 5:07pm
Hi Thanks for your fast answer
I just took a project from the Example projects for Arduino IDE http://www.arduino.cc/en/Tutorial/SerialCallResponse and still here I have a fault, so it's not the project I work on.
The fault is here as well. cannot resolve symbol on establishContact see file Test1.txt.

The project I work on the output file is Test2.txt

https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Test1.txt ( 45 KB | 2 Downloads )
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Test2.txt ( 437 KB | 1 Download )

Title: Re: Project reference
Post by Visual Micro on Jul 1st, 2019 at 5:41pm
Thanks for the verbose output. I tried the project you posted (test2) in your first link and it builds OK but is too large. I see the same error in arduino and visual micro that the program size is too large.

Please post screen shot of errors you see?


Code (]Program too big. The size is 1357686 bytes (of a 1310720 byte maximum). Ensure debugging is OFF and/or see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Debug build failed for project 'AG_GPS_ROOF_UNIT_ESP32'
[/code):


Test1 has built correctly - OK
[code]Program SerialCallResponse size: 200.612 bytes (used 15% of a 1.310.720 byte maximum) (4,00 secs)
Minimum Memory Usage: 13500 bytes (4% of a 327680 byte maximum)

# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination: file:///C:/Program%20Files%20(x86)/Arduino/examples/04.Communication/SerialCallResponse/Release/



Title: Re: Project reference
Post by Jesper on Jul 1st, 2019 at 6:13pm
Humm regarding the Test2 that the program is but is too large I can change in the settings of the ESP32. But I don't understand that you can compile the project.
I did following
1. Download from the git
2. Extract the file.
3. I get an error when opening the file AG_GPS_ROOF_UNIT_ESP32.ino that it needs to be in a folder named AG_GPS_ROOF_UNIT_ESP32. I create the folder and copy all the files into the new folder.
4. Dubble clicks n the file AG_GPS_ROOF_UNIT_ESP32.ino Arduino IDE open and i can compile the project.
5. I start VisualStudio and open an Arduino project select the file AG_GPS_ROOF_UNIT_ESP32.ino and compile the project. and now i get the errors.

It's a totally new installation of Visual Micro, so I don't know i i need to set something up.
Here it some screenshots

1_006.PNG ( 115 KB | 0 Downloads )
2_006.PNG ( 110 KB | 1 Download )

Title: Re: Project reference
Post by Visual Micro on Jul 1st, 2019 at 6:23pm
Hi,

I think the confusion is that in Visual Micro you are seeing some intellisense errors. We can look into these but the compile is working okay. You can see that when you click the compile button.

It is important to understand that there is a difference between intellisense errors and build errors. Visual Micro handles the build but leaves visual studio to handle the intellisense.

We can feed additional information into intellisense which will improve things for you but it is important first to see that when you click Build in Visual Micro everything is working the same as the arduino ide. I can see in the two files you posted that the build is working correctly.

One thing that will help is to set the drop down list at the top of the "Errors List" to "open documents only" or to set the  drop down list at the top right of the Errors List to "Build Only". This will be less confusing until we look into the intellisense problem.

Does this make sense?

Title: Re: Project reference
Post by Jesper on Jul 2nd, 2019 at 9:49am
Hi,

Thanks for the information.
And yes I can see that the compiler is working.
Now it's just the intellisense part that gives me a lot of errors, is there a way to solve that so I can use the intellisense?
Thx Jesper

Title: Re: Project reference
Post by Visual Micro on Jul 2nd, 2019 at 9:17pm
What is the version of visual micro you are using? You can see this in Tools>Extensions and Updates

Title: Re: Project reference
Post by Jesper on Jul 3rd, 2019 at 5:36am
I use version 1906.30.0 and Visual Studio version version 16.1.5 (2019)

Title: Re: Project reference
Post by Visual Micro on Jul 3rd, 2019 at 11:24am
In your screen shot I can see intellisense errors which are because you have spell check enabled.

Can you please post a picture of code or the errors list showing the intellisense errors you are referring too?

Thanks

Title: Re: Project reference
Post by Jesper on Jul 3rd, 2019 at 1:01pm
I just for an easy test I took the project from the Arduino examples projects SerialCallResponseASCII.
When I build I don't get build errors but I get IntelliSense errors. first picture
And establishContact() is marked red see info on picture

The other project it's the same.
And EEprom_empty_check is marked red see info on picture
1_007.PNG ( 118 KB | 2 Downloads )
2_008.PNG ( 192 KB | 12 Downloads )

Title: Re: Project reference
Post by Visual Micro on Jul 3rd, 2019 at 7:53pm
If you switch the drop down list at the top of "Errors List" from "Intellisense + Build" to "Build Only" it might be better for now.

I'm not seeing some of the errors you can see, the ones in red are okay for me. Hopefully you have built the new project because that will help but I can tell you it might not be perfect until we move to a new intellisense system Microsoft are in the processes of releasing.

Try to ensure you are on the latest vs2019, Microsoft are improving this area all the time.



VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.