Questions tagged [tcc]

TCC is a tiny C compiler which enables you to use C as scripting language.

117 questions
0
votes
2 answers

This c program works fine in windows but not working in Linux

This c program is working fine in windows but showing segment fault in Linux. #include #include #include #include void comb(long int *arr,long int n,long int r,long int stick) { long int check=1,sum =0; …
SID
  • 49
  • 5
0
votes
0 answers

TinyC + GTK2 + pkg-config (main missing)

For the below program compiling with GCC works: $ gcc memtray.c `pkg-config --libs --cflags gtk+-2.0` But not with TinyC (the command is different in a single character g->t): $ tcc memtray.c `pkg-config --libs --cflags gtk+-2.0` tcc: error:…
exebook
  • 32,014
  • 33
  • 141
  • 226
0
votes
1 answer

Why does tcc not recognize "main" when I include the -pthreads flag?

I am trying to compile a c application with the gtk 3.0 library with tcc. The documentation says the command to run to compile is gcc `pkg-config --cflags gtk+-3.0` -o [executable name] [source file] `pkg-config --libs gtk+-3.0` I am trying to use…
0
votes
3 answers

Null pointer detection in tcc

I created a very simple linked list and noticed a difference in output for tcc filename.c vs tcc filename.c -run for my code: #include #include #include struct llist { struct llist *next; struct llist *last; …
AppTest
  • 491
  • 1
  • 7
  • 23
0
votes
1 answer

What sections are necessary in a minimal dynamically-linked ELF program?

I assembled a simple "Hello, world" program and linked it using TCC, after which I got 4196 bytes of an executable. The program has 31 sections: ['', '.text', '.data', '.bss', '.symtab', '.strtab', '.rel.text', '.rodata', '.rodata.cst4',…
d33tah
  • 10,999
  • 13
  • 68
  • 158
0
votes
1 answer

MinGW - why is the C 'hello world' executable 42kb?

If I compile C hello world with MinGW, the resulting exe is 42Kb. If I use Tiny C Compiler, I get something 2Kb. (in both cases without specifying any options or doing anything interesting, just gcc hello.c -o hello.exe) Now I am aware that a…
Jesse
  • 51
  • 2
0
votes
0 answers

C - tcc finds error in commdlg.h?

I'm attempting to write a C program incorporating OPENFILENAME and of course I need the header file. So, following the instructions provided with tcc, I downloaded the header files MinGW uses for the Win32 API (and the library files) and put them…
DHeadshot
  • 43
  • 1
  • 4
0
votes
0 answers

How to run TCC (Tiny C Compiler) with cmd?

I am trying to use tiny C compiler with cmd, but I forgot how to locate the tcc files on cmd. How do I link cmd with tiny c compiler ?
0
votes
1 answer

Why isn't the output the same using structs

I'm using the latest version of TCC (tcc-0.9.26-win64-bin.zip). For some reason the output of this code is not what I'm expecting (the same). #include struct CELL { int row; int col; }; typedef struct CELL Cell; Cell newCell(const…
Dave Chen
  • 10,887
  • 8
  • 39
  • 67
0
votes
1 answer

Can Tiny C compiler be used for OpenCV code compiling?

I am new to OpenCV and I have only Tiny C compiler configured on my Windows XP machine. Can I use this tiny C compiler to compile opencv programs for image manipulations. I have alredy installed python2.6 and opencv2.0 on my windows xp pc. If we can…
Enjoy coding
  • 4,268
  • 12
  • 40
  • 50
0
votes
1 answer

TCC Error: index too large

I have been playing around with ray-casting and decided to use 3D arrays to make levels, However TCC spits out this: M_MAIN.C:19: error: index too large Is there a limit to how large an array can be? Code: #define MAP_01_WIDTH 8 #define…
Gip-Gip
  • 5
  • 5
0
votes
0 answers

Converting VC++ .LIB files to .DEF files

I was having problems with compiling OpenGL applications, and I found out I was using the wrong GLEW library. But I can not find the GLEW static library in the .def format. Does anyone know how I could make a definition file or were I can find one?
Gip-Gip
  • 5
  • 5
0
votes
0 answers

Error when including Windows.h with TCC

What I really wanted to do was to include Ws2tcpip, so I followed the instructions in the answers from this thread, copied MinGW's include files to \tcc\include\winapi\ and created a library from wsock2.dll. But the problem I get now is when I…
chmod
  • 278
  • 1
  • 2
  • 7
0
votes
1 answer

Smaller GCC package, only C needed

Is there a smaller download for GCC if the only language you need to be compiled is C? TCC is a fantastic option for windows, however I need it to compile on several platforms. I also like the fact that GCC is very commonly used. If there is not a…
Braden Steffaniak
  • 2,053
  • 3
  • 25
  • 37
0
votes
0 answers

Calling convention mismatch for x64 floating point functions

I'm having a weird error. I have one module compiled by one compiler (msvc in this case), that calls code loaded from another module compiled by a seperate compiler (TCC). The tcc code provides a callback function that for both modules are defined…
Shaggi
  • 1,121
  • 1
  • 9
  • 31