public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* undefined reference
@ 2022-06-05 10:13 Ren Wang
  2022-06-05 12:35 ` Carlos O'Donell
  0 siblings, 1 reply; 2+ messages in thread
From: Ren Wang @ 2022-06-05 10:13 UTC (permalink / raw)
  To: libc-help

I am working on a project which calls _disable and _enable interrupt built
in functions in the Windows environment. I can build the code with /Oi with
Microsoft Visual Studio, but failed with gcc compiler with link errors:

undefined reference to _disable, _enable.

I have code included, very simple. I am not sure what the problem is,
please advise.

Regards,

Ren
---------------------------
#include <stdio.h>
#include <stdlib.h>
#include <intrin.h>
int main()
{
    _disable();
    printf("Hello world!\n");
    _enable();
    return 0;
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-05 12:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-05 10:13 undefined reference Ren Wang
2022-06-05 12:35 ` Carlos O'Donell

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).