public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nasser Rowhani <rownasser@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Mingw-w64 for example...
Date: Mon, 10 Jul 2023 23:11:27 +0300	[thread overview]
Message-ID: <CAFovLnb50akYB1jULY9t9p-Fw2p65rJ1c=z0KqBAUqeNypdzdA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2258 bytes --]

Hi..

Is it possible to reconfigure gcc after it being built?
Like mingw-w64 is taking from its own include directory.
I want it to point to windows sdk instead. Is it possible?
I got errors i couldn't understand when i set the -I (i letter) and the -l
(small letter L)
options on gcc compiler. is it of any use if i show you? thanks..

It's mentioned in the manual that the compiler options l and I have
precedence over the
configuration. so how come it's complaining;

C:\mystuff\delme>gcc mingw.c -l "C:\Program Files (x86)\Windows
Kits\10\Lib\10.0.22621.0\um\x64\user32.lib" -I "C:\Program Files
(x86)\Windows Kits\10\Include\10.0.22621.0\um"

In file included from
C:/mystuff/winlibs-x86_64-posix-seh-gcc-13.1.0-llvm-16.0.5-mingw-w64ucrt-11.0.0-r5/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
                 from
C:/mystuff/winlibs-x86_64-posix-seh-gcc-13.1.0-llvm-16.0.5-mingw-w64ucrt-11.0.0-r5/mingw64/x86_64-w64-mingw32/include/windef.h:9,
                 from C:\Program Files (x86)\Windows
Kits\10\Include\10.0.22621.0\um/windows.h:175,
                 from mingw.c:4:
C:\Program Files (x86)\Windows
Kits\10\Include\10.0.22621.0\um/winnt.h:101:10: fatal error: kernelspecs.h:
No such file or directory
  101 | #include <kernelspecs.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.



i don't even know what the error means! it's saying something along the
lines of:
 1 file included from, and then the next from, which means what? etc.. and
then after mingw.c:4: there is what?

all i know is that windows.h was included in my project, and then i presume
windef.h was included from within the windows.h file?
how did it achieve changing directories? windows.h is in the includes i
mentioned in the compiler options..etc.. there's also a further
proof that it shouldn't have switched folders,that winnt is still in the
specified include folder which is maybe included from windows.h...
can you see the contradiction between last two files specified ? and first
file(minwinder.h)?

sorry if i'm not clear or if i'm not asking the right person :)
the code:


#include <stdio.h>
#include <windows.h>

int main(int argc, char *argv[])
{
  printf("asdklfjasldfka\n");
  MessageBoxA(NULL, "hi.....", "caption", MB_OK);
  return 0;
}

             reply	other threads:[~2023-07-10 20:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10 20:11 Nasser Rowhani [this message]
2023-07-11  6:23 ` LIU Hao
2023-07-11  8:30   ` Xi Ruoyao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFovLnb50akYB1jULY9t9p-Fw2p65rJ1c=z0KqBAUqeNypdzdA@mail.gmail.com' \
    --to=rownasser@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).