msteinbeck / tinyspline

ANSI C library for NURBS, B-Splines, and Bézier curves with interfaces for C++, C#, D, Go, Java, Javascript, Lua, Octave, PHP, Python, R, and Ruby.
MIT License
1.21k stars 207 forks source link

Problem with windows fileapi.h (c++ msvc22) #242

Closed MichalJarosz1 closed 7 months ago

MichalJarosz1 commented 7 months ago

include "tinysplinecxx.h" along with #include causes build errors.

Errors:

Severity Code Description Project File Line Suppression State Details Error (active) E0035 #error directive: "No Target Architecture" Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 169
Error (active) E0338 more than one instance of overloaded function "RtlCaptureContext" has 'C' linkage Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 20758
Error (active) E0020 identifier "stosb" is undefined Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 21771
Error (active) E0020 identifier "
readgsqword" is undefined Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 24481
Error (active) E0020 identifier "__readgsqword" is undefined Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 24492
Error (active) E0020 identifier "SLIST_HEADER" is undefined Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 21432
Error (active) E0020 identifier "PSLIST_HEADER" is undefined Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 21424
Error (active) E0020 identifier "PSLIST_HEADER" is undefined Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 21439
Error (active) E0020 identifier "PSLIST_HEADER" is undefined Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 21446
Error (active) E0020 identifier "PSLIST_HEADER" is undefined Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 21454
Error (active) E0020 identifier "PSLIST_HEADER" is undefined Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 21464
Error (active) E0020 identifier "PSLIST_HEADER" is undefined Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 21471
Error (active) E0020 identifier "PCONTEXT" is undefined Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\minwinbase.h 389
Error C1189 #error: "No Target Architecture" Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 169
Error (active) E0035 #error directive: Must define a target architecture. Projectt C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 253

MichalJarosz1 commented 7 months ago

There is a workaround for std=c++17 and newer. It is to use #include instead of #include

msteinbeck commented 7 months ago

@MichalJarosz1 Thanks for providing this workaround.