Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[windows] shellapi.h(68): error C2061: syntax errors #39

Open
davehorner opened this issue Oct 14, 2023 · 1 comment
Open

[windows] shellapi.h(68): error C2061: syntax errors #39

davehorner opened this issue Oct 14, 2023 · 1 comment

Comments

@davehorner
Copy link
Contributor

davehorner commented Oct 14, 2023

Ran into the [ERROR] Could not open file nob.c: 2 error. Running nob.exe did work.

I am now at something with my shellapi.
I see there is some concern with getting windows.h included before shellapi. I verified the code and see windows.h being included; and I also tested by adding it into plug.c. This did not work.

[INFO] CMD: cl.exe /I ./raylib/raylib-4.5.0/src/ /Fobuild\ /Febuild\musializer.exe ./src/musializer.c ./src/plug.c ./src/ffmpeg_windows.c /link /LIBPATH:build/raylib/win64-msvc raylib.lib Winmm.lib gdi32.lib User32.lib Shell32.lib
Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32824 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

musializer.c
plug.c
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(68): error C2061: syntax error: identifier 'DECLSPEC_IMPORT'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(68): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(68): error C2143: syntax error: missing '{' before '*'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(68): error C2061: syntax error: identifier 'CommandLineToArgvW'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(68): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(68): error C2146: syntax error: missing ')' before identifier 'lpCmdLine'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(68): error C2061: syntax error: identifier 'lpCmdLine'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(68): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(68): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(82): error C2061: syntax error: identifier 'DECLSPEC_IMPORT'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(82): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(82): error C2061: syntax error: identifier 'STDAPICALLTYPE'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(82): error C2146: syntax error: missing ')' before identifier 'hDrop'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(82): error C2061: syntax error: identifier 'hDrop'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(82): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(82): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(82): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(84): error C2061: syntax error: identifier 'DECLSPEC_IMPORT'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(84): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(84): error C2061: syntax error: identifier 'STDAPICALLTYPE'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(84): error C2146: syntax error: missing ')' before identifier 'hDrop'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(84): error C2061: syntax error: identifier 'hDrop'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(84): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(84): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(84): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(90): error C2061: syntax error: identifier 'DECLSPEC_IMPORT'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(90): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(90): error C2061: syntax error: identifier 'STDAPICALLTYPE'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(90): error C2146: syntax error: missing ')' before identifier 'hDrop'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(90): error C2061: syntax error: identifier 'hDrop'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(90): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(90): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(90): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(91): error C2061: syntax error: identifier 'DECLSPEC_IMPORT'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(91): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(91): error C2061: syntax error: identifier 'DragFinish'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(91): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(91): error C2146: syntax error: missing ')' before identifier 'hDrop'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(91): error C2061: syntax error: identifier 'hDrop'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(91): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(92): error C2061: syntax error: identifier 'DECLSPEC_IMPORT'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(92): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(92): error C2061: syntax error: identifier 'DragAcceptFiles'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(92): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(92): error C2146: syntax error: missing ')' before identifier 'hWnd'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(92): error C2061: syntax error: identifier 'hWnd'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(92): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(92): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(94): error C2061: syntax error: identifier 'DECLSPEC_IMPORT'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(94): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(94): error C2061: syntax error: identifier 'STDAPICALLTYPE'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(94): error C2146: syntax error: missing ')' before identifier 'hwnd'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(94): error C2061: syntax error: identifier 'hwnd'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(94): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(94): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(95): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(96): error C2061: syntax error: identifier 'DECLSPEC_IMPORT'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(96): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(96): error C2061: syntax error: identifier 'STDAPICALLTYPE'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(96): error C2146: syntax error: missing ')' before identifier 'hwnd'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(96): error C2061: syntax error: identifier 'hwnd'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(96): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(96): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(97): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(104): error C2061: syntax error: identifier 'DECLSPEC_IMPORT'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(104): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(104): error C2061: syntax error: identifier 'STDAPICALLTYPE'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(104): error C2146: syntax error: missing ')' before identifier 'lpFile'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(104): error C2061: syntax error: identifier 'lpFile'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(104): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(104): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(104): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(106): error C2061: syntax error: identifier 'DECLSPEC_IMPORT'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(106): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(106): error C2061: syntax error: identifier 'STDAPICALLTYPE'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(106): error C2146: syntax error: missing ')' before identifier 'lpFile'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(106): error C2061: syntax error: identifier 'lpFile'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(106): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(106): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(106): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(113): error C2061: syntax error: identifier 'DECLSPEC_IMPORT'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(113): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(113): error C2061: syntax error: identifier 'STDAPICALLTYPE'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(113): error C2146: syntax error: missing ')' before identifier 'hWnd'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(113): error C2061: syntax error: identifier 'hWnd'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(113): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(113): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(113): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(114): error C2061: syntax error: identifier 'DECLSPEC_IMPORT'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(114): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(114): error C2061: syntax error: identifier 'STDAPICALLTYPE'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(114): error C2146: syntax error: missing ')' before identifier 'hWnd'
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\shellapi.h(114): fatal error C1003: error count exceeds 100; stopping compilation
ffmpeg_windows.c
./src/ffmpeg_windows.c(79): warning C4047: 'initializing': 'FFMPEG *' differs in levels of indirection from 'int'
Generating Code...
[ERROR] command exited with exit code 2

https://stackoverflow.com/questions/2953704/vs2010-lots-of-errors-when-including-standard-libraries

@davehorner davehorner changed the title [windows] [windows] shellapi.h(68): error C2061: syntax errors Oct 14, 2023
@davehorner
Copy link
Contributor Author

Good news is that I have a successful build on Win11x64 tonight. I will revisit my Win10 machine where I experienced this shellapi.h junk.

My Win11x64 machine it just works, after making sure to use nob.exe and not just nob #29. Also #45. I expect that I need to install/re-install the windows sdk which is time consuming and annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant