tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] TCC and round()


From: Brad Elliott
Subject: Re: [Tinycc-devel] TCC and round()
Date: Tue, 28 Jun 2016 19:15:51 +0000

I updated msvcrt.def to link against msvcr120.dll and it seems to be working ok. I can use round() now. Figured I would attach it for reference in case it’s useful to anyone else running on Windows.

 

Brad

 

From: Brad Elliott
Sent: June-28-16 1:00 PM
To: 'address@hidden' <address@hidden>
Subject: RE: TCC and round()

 

Hmm, I appear to be able to get it to work by modifying lib/msvcrt.def to link against msvcr120.dll instead of msvcr.dll and manually adding the definition for round:

 

  LIBRARY msvcr120.dll

 

  EXPORTS

  …

  round

 

Is this a safe thing to do?

 

Brad

 

From: Brad Elliott
Sent: June-28-16 12:19 PM
To: 'address@hidden' <address@hidden>
Subject: TCC and round()

 

Hi everyone,

 

Has anyone had success getting round() to work in TCC without implementing my own? Version 0.9.26 looks like it added support for C99 and I can see the prototype in math.h but I can’t compile it:

 

     tcc: error: undefined symbol 'round'

 

This is the simple example I was using:

 

    #include <stdio.h>

    #include <math.h>

    #include <stdlib.h>

 

    int main(void)

    {

        printf("%f\n", round(0.1));

        return EXIT_SUCCESS;

    }

 

I don’t see any options to specifically enable C99 like the --std=c99 in GCC.

 

Any ideas?


Thanks,

 

Brad Elliott

Attachment: msvcrt.def
Description: msvcrt.def


reply via email to

[Prev in Thread] Current Thread [Next in Thread]