Menu

#191 fatal error: ./specstrings.h: Invalid argument

v1.0 (example)
open
nobody
2
2023-04-24
2023-04-24
No

Running MSYS 12.2.0.
Code: https://github.com/depler/curl-impersonate-win/
Compilation error at minwindef.h:
C:/msys64/mingw64/include/minwindef.h:6:10: fatal error: ./specstrings.h: Invalid argument

Aside form the abouve error, which is almost at the end of the module, the code compiles perfectly.

Does this meant lines 6 and 10 of minwindef.h or line 6 of minwindef.h and line 10 of specstrings.h?

Either way, both file's syntax look legit to me, but ming insists that specstrings.h is an 'Invalid argument'.

So far, the Github dev, the SF discussion forum and SOF haven't responded, so this is a 'last gasp' since it appears to be ming related rather than anything to do with the code I'm running.

I sure could use some insight on fixing this.

Thanks for looking.

Error from minwindef.h:
--------------------------------------------
windres --include-dir=../include -DDEBUGBUILD=0 -O coff -F pe-x86-64 -i libcurl.rc -o libcurl.res
In file included from C:/msys64/mingw64/include/windef.h:9,
             from C:/msys64/mingw64/include/windows.h:69,
             from C:/msys64/mingw64/include/winsock2.h:23,
             from ../include/curl/system.h:408,
             from ../include/curl/curl.h:37,
             from curl_setup.h:161,
             from version.c:25:
C:/msys64/mingw64/include/minwindef.h:6:10: fatal error: ./specstrings.h: Invalid argument
    6 | #include <specstrings.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
--------------------------------------------

First 16 lines of minwindef.h:

--------------------------------------------
 1 #ifndef _MINWINDEF_
 2 #define _MINWINDEF_
 3
 4 #include <_mingw.h>
 5 #include <winapifamily.h>
 6 #include <specstrings.h>
 7
 8 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
 9
10 #if !defined (STRICT) && !defined (NO_STRICT)
11 #define STRICT 1
12 #endif
13
14 #ifndef WIN32
15 #define WIN32
16 #endif
...
--------------------------------------------

First 22 lines of specstrings.h:

--------------------------------------------
 1 /**
 2 * This file has no copyright assigned and is placed in the Public Domain.
 3 * This file is part of the mingw-w64 runtime package.
 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
 5 */
 6
 7 #ifndef SPECSTRINGS_H
 8 #define SPECSTRINGS_H
 9
10 #define __specstrings
11
12 #include <sal.h>
13
14 #ifdef __cplusplus
15 #ifndef __nothrow
16 #define __nothrow __declspec(nothrow)
17 #endif
extern "C" {
...

Discussion


Log in to post a comment.