2

So the latest version of TCC supposedly has some of the features of C99 implemented, however, I have found that it does not include C99's Math library.

Is there a way I can get it to use more of C99's libraries on windows? I googled around and found some advice mostly pertaining to Linux, but for this project I need to get it to work on windows.

EDIT: This is not a question about getting 'any' compiler on the windows platform. I realize that there are many compilers. I specifically need to get TCC to do this.

EDIT: The project needs to do some on the fly C compilation, and we would like to see if we can use TCC for this feature.

anatolyg
  • 26,506
  • 9
  • 60
  • 134
timsbleung
  • 41
  • 1
  • 1
  • 4
  • Be specific, what is missing?? – Hans Passant Jun 06 '14 at 16:07
  • Why do you use TCC for a large project? Its optimizer are not good and most probably used for small scale purpose. GCC and Clang have rather good C99 support – phuclv Jun 06 '14 at 16:21
  • The project needs to do some on the fly C compilation, and we would like to see if we can use TCC for this feature – timsbleung Jun 06 '14 at 17:04
  • According to TCC website, nothing much in C99 are supported thought – phuclv Jun 06 '14 at 17:07
  • yeah, that's why I was asking if anyone had experience integrating their own packages into the compiler. I know on linux some guy from a previous question was able to compile tcc himself adding in some of his own libs from /usr/lib/. I would like to know if anyone had done anything similar in windows – timsbleung Jun 06 '14 at 17:11
  • you also have a option of using Eclipse IDE for C with gcc – Vagish Jun 07 '14 at 03:16
  • @Vagish the IDE doesn't relate anything here. For example he wants to embed the compiler into his program then inherently there's no usage of IDE, and he can't embed a whole IDE though – phuclv Jun 07 '14 at 13:08
  • @Luu As I have mentioned n my comment to use gcc compiler and Eclipse IDE as an option to TCC,there are other options also.But as I am not from CS domain,please explain me what timsbleung is trying to achieve and what do you mean by embedding a compiler into program. – Vagish Jun 07 '14 at 13:40

2 Answers2

2

The documentation for Windows indicates that the TCC installation on Windows deploys a minimal set of MinGW headers. Copy the headers you need from MinGW into the tcc/include/winapi (i.e. place them under tcc-build-root/win32/include/winapi) and then build tcc with build-tcc.bat.

David Mertens
  • 1,037
  • 8
  • 12
0

Try Visual Studio Express Edition for 'C'.It's free and IDE is more developed than TCC

Vagish
  • 2,520
  • 19
  • 32
  • 1
    Hehe, no, not for C99 :) – Hans Passant Jun 06 '14 at 15:59
  • @Hans Why not?VS C++ 2013 supports C99 – Vagish Jun 06 '14 at 16:09
  • @Vagish no, not complete. ["Visual C++ 2013 implements support for most of C99 by utilizing libraries from Dinkumware."](http://en.wikipedia.org/wiki/C99#Implementations). VC is a C++ compiler and it never aims for fully C99 support http://blogs.msdn.com/b/vcblog/archive/2013/07/19/c99-library-support-in-visual-studio-2013.aspx http://msdn.microsoft.com/en-us/library/hh409293.aspx – phuclv Jun 06 '14 at 16:20
  • "Microsoft has made it clear that they see no strong push from the market to allocate resources to support C99 in MSVC, so it's almost certain that the only parts of C99 you'll see in MSVC's C compiler mode are those that get brought in because of C++." http://stackoverflow.com/questions/9610747/which-c99-features-are-available-in-the-ms-visual-studio-compiler?rq=1 – phuclv Jun 06 '14 at 16:24
  • @LưuVĩnhPhúc That second quote is from 2012. VS2013 does add *many* C99 features that previous versions of the VC compiler lacked. – nobody Jun 06 '14 at 16:28
  • The OP's reason for using TCC is unspecifid. It may not be *just* because he wants a C99 compiler. If that were the case, MinGW would probably be the simplest suggestion, as it certainly supports all of C99. – David Mertens Jun 07 '14 at 16:22
  • @DavidMertens The reason was buried in a comment; I copied it to the question description for convenience. – anatolyg Jun 07 '14 at 16:47
  • The reasons to use TCC would generally not be because of its support for the standard...but because it is small (~150K) and open source. It could be used to embed a C compiler into another program and not carry a lot of dependencies. For listed reasons, MS is a poor choice for standards compliance (just in general as they are pragmatic) and the compiler is not open source...and a lot larger than 150K. – HostileFork says dont trust SE Apr 14 '15 at 03:57