Re: undefined reference

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

 



You need linked to appropriate library if windows you target.
--
Sent from Outlook Email App for Android нядзеля, 05 чэрвеня 2022, 04:04PM +03:00 from renwang101--- via Gcc-help  gcc-help@xxxxxxxxxxx :

>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 
>#include 
>#include 
>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