Skip to main content

Questions tagged [tcc]

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

tcc
3 votes
1 answer
131 views

Why doesn't TCC generate my custom section?

I have a small C program: #include <stdio.h> struct foo { int x; struct foo *next; }; #define CONST __attribute__((used, section("const_heap"))) struct foo f CONST = { 1, 0 }; ...
tekknolagi's user avatar
  • 10.9k
0 votes
0 answers
42 views

I want to read binary values by fread and TCC does it well , also CLand GCC do it once in about 20 times but the rest are garbage values

I want to read files as binary and wrote this piece of code : #include <stdio.h> int main() { FILE * fp = fopen("/home/lovelorn/Pictures/post-3.jpeg", "rb"); int n; ...
HadiLovelorn's user avatar
0 votes
0 answers
78 views

Expected identifier error when using static in C

I can’t figure out why it throws an identifier expected error on line 3. Code was compiled using tcc. #include <stdlib.h> void genset(size_t N, size_t parent[static N]) { parent[N] = N; } #...
twiglet's user avatar
1 vote
2 answers
88 views

SIGSEGV on x86/x64 due to conflict between raw memory access and DS register in C compiled with TCC as JIT engine on Linux

First, I know this is kind of unholy thing but I attempts to reduce instructions overhead in jitted C code with TCC by replacing some dereference with well-known constant memory location to evaluate ...
Wadosh's user avatar
  • 35
1 vote
1 answer
174 views

Cross-compile libtcc

I'm trying to create a simple hello world program that uses libtcc to dynamically compile the code. It works fine when I compile it natively on linux. However, there are link errors when I try to ...
André Rosa's user avatar
0 votes
0 answers
25 views

tcc, g++ and va_args

I want to mix code compiled by tcc and g++, but if va_arg is called there is a link error. How to link it? Automation want more details, but I have nothing to add more here. Code is self-explanatory. ...
user2772439's user avatar
0 votes
1 answer
74 views

getting early EOF when using specific sequence of bytes

I have this example program which just reads stdin and prints the characters as ints: #include <stdio.h> int main() { while (1) { char c = getchar(); printf("%i\n",...
Makalone LOgman's user avatar
2 votes
0 answers
36 views

Source code in memory rather than file for GDB

I'm writing a JIT that compiles c fragments using libtcc to an ELF object (output type TCC_OUTPUT_OBJ) with dwarf-5 debug info, loads the resulting ELF object manually (mapping, relocating and linking ...
Cyan Ogilvie's user avatar
0 votes
1 answer
89 views

libtcc unresolved external symbol errors

Trying to make libtcc work. Trying to run hello world example of libtcc library: https://bellard.org/tcc/ I downloaded the tcc-0.9.27-win64-bin.zip version. I created C++ console application project ...
KulaGGin's user avatar
  • 1,131
2 votes
1 answer
1k views

Inconsistency with %hhu format specifier in C printf function?

As far as I had understood it, the %hhu format specifier should have the range of an unsigned char. However, in some compilers I test it in, it seems to have the range of an unsigned short instead. Is ...
entropicdecay's user avatar
0 votes
0 answers
41 views

How to get the hidden fields from any entity in TCC

I'm looking for these two fields: JobInformation,DescriptionExternalHTML and JobInformation,DescriptionInternalHTML. In which Recruiting module and entity can I find these fields? I have searched for ...
Nithya Bussety US's user avatar
2 votes
1 answer
234 views

C code compiles and runs under Tiny C Compiler, but it does not run under GCC [duplicate]

I'm relearning C. The following code segment compiles and runs as expected under Tiny C Compiler (TCC). It compiles without complaint under GCC, but it doesn't produce any output under Windows 10. ...
Chief Cook's user avatar
0 votes
1 answer
142 views

Simple batch file fails with TCC/LE

I found a problem with some batch files not written by me when executed in TCC/LE, while the same ones run flawlessly with CMD.EXE (Windows XP up to Windows 11 versions). Maybe the problem is very ...
LuC's user avatar
  • 369
0 votes
0 answers
33 views

Why doesn't @altname with a variable work? - TCC

This is a TCC code. I wanted my .BAT file to return a shortened name for a specified file (with @ALTNAME), but I don't want it to return the whole path of the file. My solution doesn't seem to be ...
adriana's user avatar
0 votes
0 answers
183 views

TinyC Compiler "include file pthread.h not found"

Having read the changelog and some mail archives, pthread is supposed to be supported by TinyC Compiler (TCC) since 0.9.26 https://bellard.org/tcc/changelog.html version 0.9.26: User interface: - -...
LazerBlazer's user avatar

15 30 50 per page
1
2 3 4 5
9