Visual Studio Enterprise is an integrated, end-to-end solution for teams of any size with demanding quality and scale needs. Whether it’s for a phone, desktop, or the cloud, Visual Studio makes it easier to build great software on PC and Mac. Visual Assist is a Visual Studio extension - a productivity tool for refactoring, reading, writing, navigating and generating C / C++ / C# code.
- Visual Studio For Mac Os X
- C++ Visual Studio For Mac
- Visual Studio For Mac C++ Extension
- C C++ Extension For Visual Studio
Active1 month ago
- C/C++ support for Visual Studio Code is provided by a Microsoft C/C++ extension to enable cross-platform C and C++ development using VS Code on Windows, Linux, and macOS. The extension is still in preview and our focus is code editing, navigation, and debugging support for C and C++ code everywhere that VS Code runs.
- Using Visual Studio Code and Building and Debugging with C++ on Mac OS X Saturday, August 6th, 2016. By Michael Suodenjoki, August 2016. I wanted to play with and test Visual Studio Code's (VSCode) features for doing C++ development on the Mac platform. At work and in the past 20+ years I've mainly been using Windows, so this is somewhat different and new interesting territory for me.
- Download C# IL Viewer for Visual Studio Code or install it directly within Visual Studio Code by launching Quick Open (CMD+P for Mac or CTRL+P for Windows) and pasting in the follow command and press enter.
I've begun using VSC for my embedded C projects with gcc for ARM on a Mac. Having set up include paths in
c_cpp_properties.json
, most of my #includes
are now working. However, a line such as this:produces a red squiggly underline and the error:
The source file in question includes stdint:
and the
includePath
includes:and:
(the only other option being
msvc-x64
).The codebase compiles just fine when I use make and gcc. How do I show the C/C++ extension where
uint32_t
is?Edit:
stdint.h
looks like this:and
stdint-gcc.h
contains:Visual Studio For Mac Os X
Visual studio for mac free trial. This suggests
__UINT32_TYPE__
is NOT defined when VSC is parsing my code, but it IS defined when I build with make and gcc.Edit:
Following @mbmcavoy's answer I'm including my
c_cpp_properties.json
file here:Edit:
On digging deeper, I found that
Gama11gcc-arm-none-eabi-4_9-2015q3/lib/gcc/arm-none-eabi/4.9.3/include/stdint.h
had __STDC_HOSTED__
defined and therefore stdint-gcc.h
was not actually being included. Instead, that header does an 'include_next <stdint.h>
', which finds gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include/stdint.h
. Fl studio mac os. I still can't see where unint32_t is defined, either for gcc and make or for VSC.15.6k6 gold badges33 silver badges53 bronze badges
EliotEliot1,1772 gold badges14 silver badges37 bronze badges
2 Answers
After trying all of the proposed solutions to no effect, I consider the uint32_t issue to be a bug.
To solve the annoying warnings in VSCode, just add the following line after your #include section:
By doing this once in a single file, it fixes my VSCode warnings and still compiles.
wscourge5,4158 gold badges29 silver badges53 bronze badges
gekartgekart
I have been able to resolve this on my machine (Windows), with three steps:
- Applying Compiler Defines to the C/C++ Extension
The question is correct when it states 'This suggests
__UINT32_TYPE__
is NOT defined when VSC is parsing my code, but it IS defined when I build with make and gcc.' The ARM cross-compiler has many built-in defines that are not included in the clang-x64 parser.First, find out defines your gcc compiler defines, with the
-dM -E
options. On Windows I was able to dump the output to a file with echo | arm-none-eabi-gcc -dM -E - > gcc-defines.txt
Second, add the defines to your
c_cpp_properties.json
file. Note that where the #define sets a value, you need to use an =
sign here. (You could probably just add individual defines as you need them, but I used Excel to format them as needed and sort. The first defines are for my project, matching the defines in my Makefile.)- Setting the Symbol Database
After doing a few experiments with individual defines, I could see the define as being processed in
stdint-gcc.h
, any uses of the types still produced errors. I realized in my c_cpp_properties.json
file that I had 'databaseFilename': '
This is used for the 'generated symbol database', but was not configured properly. I set it to:- Restart Visual Studio Code
C++ Visual Studio For Mac
After quitting and restarting Visual Studio Code, declarations do not result in the error, and when hovering over a variable, it shows the appropriate type.
Visual Studio For Mac C++ Extension
mbmcavoymbmcavoy1,8114 gold badges17 silver badges32 bronze badges