tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Compiling for Windows 32 Executable


From: Mike
Subject: Re: [Tinycc-devel] Compiling for Windows 32 Executable
Date: Tue, 03 Jul 2012 13:18:37 -0400
User-agent: Mozilla/5.0 (Windows NT 6.0; rv:13.0) Gecko/20120614 Thunderbird/13.0.1

EXEs and DLLs in MS Windows are PE files. ELFs are on other operating systems, not MS Windows. Except...: TCC's object files (*.o) are actually in ELF format. But, when TCC finnalyy creates an EXE or DLL, it's in PE format. TCC just uses ELF format as a temporary code storage format, for object files only.

If that's a regular mS WINDOWs command line, the (*) askterisk wont expand, I think.

If that's an MSYS command line, the command should work mostly. I spot a mistake, though. The -r switch makes the output be a object file, not EXE or DLL (hence making an ELF file). Look at the documentation for the -r switch. I'd take the -r switch out, then you're fine.


On 7/3/2012 11:20 AM, Kate Stedman wrote:
Forgive me if this is too trivial or has been posted before but I’m
going cross-eyed searching Google.

I am trying to create a Windows 32 executable using the TinyCC compiler.
My code is split across 34 small .c files and I want to compile and link
it to run in a command prompt in Windows.

I am trying to invoke tcc from the command line :

C:>tcc\tcc -r SOURCE\*.c -o DOWNLOAD\VMonitor.exe –v

(tcc version 0.9.25)

The output .exe is not a Win32 executable file beginning with a
so-called "MZ" header, followed by a so-called "PE" header – it seems to
be an .elf file format. I have used this compiler with a single .c file
creating a Windows 32 format executable before with success.

What have I done wrong and what is the solution if there is one ?

Thank you

Regards

kates

        



This Email and any attachments may contain confidential and privileged
information for the use of the designated recipients named above only.
If you are not the intended recipient, you are hereby notified that you
have received this communication in error and that any review,
disclosure, dissemination, distribution or copying of it or its content
is prohibited. If you have received this communication in error, please
reply to the sender immediately and destroy all copies of this
communication and any attachments.

Registered in England No. 02074604.
Registered Office. Vislink International Limited, Marlborough House,
Charnham Lane, Hungerford, Berkshire RG17 OEY.


_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel






reply via email to

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