undefined reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
}





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux