prb28 / vscode-amiga-assembly

Amiga Assembly extension for Visual Studio Code
GNU General Public License v3.0
178 stars 12 forks source link

fatal error: stdint.h: No such file or directory #265

Closed larsonmars closed 1 year ago

larsonmars commented 1 year ago

Hello,

I am trying to port some libraries, but found that including stdint.h fails, although __STDC_VERSION__ is defined to be at least 199901L. The library provides its own stdint types, but uses if available. It tests availability like this:

#if __STDC_VERSION__ >= 199901L
#include <stdint.h>
#endif

However, it seems that doing so includes %USERPROFILE%.vscode\extensions\bartmanabyss.amiga-debug-1.7.1\bin\win32\opt\lib\gcc\m68k-amiga-elf\12.2.0\include\stdint.h which looks like this:

#ifndef _GCC_WRAP_STDINT_H
#if __STDC_HOSTED__
# if defined __cplusplus && __cplusplus >= 201103L
#  undef __STDC_LIMIT_MACROS
#  define __STDC_LIMIT_MACROS
#  undef __STDC_CONSTANT_MACROS
#  define __STDC_CONSTANT_MACROS
# endif
# include_next <stdint.h>
#else
# include "stdint-gcc.h"
#endif
#define _GCC_WRAP_STDINT_H
#endif

The line # include_next <stdint.h> causes the error.

A work around is to redefine __STDC_HOSTED__ to 0, so it will include stdint-gcc.h. I don't know if this is intended, though.

larsonmars commented 1 year ago

Sorry this was the wrong Repository.