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 flag 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, maybe I should link with a specific library. Please advise. Regards, Ren --------------------------- #include <stdio.h> #include <stdlib.h> #include <intrin.h> int main() { _disable(); printf("Hello world!\n"); _enable(); return 0; }