Variable "uint8_t" is not a type name. stdint.h inclusion does not resolve issue

I have been trying to compile a project that I have gotten from someone. However, amoung many other errors, I am seeing the error ‘variable “uint8_t” is not a type name.’

I have done some googling and the consistent answer is to include ‘stdint.h’ and/or ‘Arduino.h’ but this does not seem to be working. The code section can be seen at the bottom.

My .ini file has the dependencies listed as below. This code should compile out of the box, but I am getting almost 100 errors including what I just mentioned. I am fairly new to this IDE so am not sure if there is some sort of installation or dependency I am missing. Would anybody have any ideas on this?

[env:xiaoblesense_arduinocore_mbed]
board = xiaoblesense
lib_deps = 
	arduino-libraries/ArduinoBLE@^1.3.2
	seeed-studio/Seeed Arduino LSM6DS3@^2.0.3
#pragma once
#define MS5837_H
#include <stdint.h>
#include <Wire.h>


#define WITH_LOCK(x) x;

class MS5837
{
public:

	MS5837(int size, int seed, uint8_t addr, TwoWire& wire);

	static const float Pa;
	static const float bar;
	static const float mbar;
	int mbarADC  = 0;
	int mbarInt = 0;
	int calValue = 101300;


	bool begin();

You must have a corrupted stdint.h

https://cplusplus.com/reference/cstdint/

That’s odd. I’ve tried removing any C extensions in my VSCode IDE and re-installing PlatformIO, but I keep getting the same issue. Do you have any idea why that might happen? Or how to correct it?
When I try to open up “stdint.h” I get a file that does # include_next <stdint.h> but does not allow me to dig any deeper

Digging into it a bit further, it seems the project is building, but it’s the IDE that is showing all these issues. It looks like I need to set up my extensions differently

Morning @b.rogersswe .

The file stdint.h is not supplied by PlatformIO, well, it is supplied, but it originates with the compiler, gcc, so uninstalling and reinstalling PlatformIO in VSCode (I assume?) will, unfortunately, not resolve the issue.

As you mention, it’s possible that some other C/C++ extension is causing the problem. Normally, when you install the PlatformIO extension into VSCode, it will also install the Microsoft C/C++ Extension pack, Microsoft C/C++ Themes, Microsoft C/C++ and Better C++ Syntax by Jeff Hykin – this latter one is now the standard manner of C/C++ code highlighting and is used by the Microsoft extensions.

If you have other C/C++ extensions installed, it’s possible that they might be interfering with the Microsoft ones.

HTH

Cheers,
Norm.