Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matveyt/nocrt0
Custom C startup code for GCC/MinGW
https://github.com/matveyt/nocrt0
gcc mingw startup windows
Last synced: about 1 month ago
JSON representation
Custom C startup code for GCC/MinGW
- Host: GitHub
- URL: https://github.com/matveyt/nocrt0
- Owner: matveyt
- License: bsd-2-clause
- Created: 2018-01-01T21:34:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-17T10:43:55.000Z (about 2 months ago)
- Last Synced: 2024-11-17T11:34:46.585Z (about 2 months ago)
- Topics: gcc, mingw, startup, windows
- Language: C
- Homepage:
- Size: 23.4 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
nocrt0
======Summary
-------Custom C startup code (mainCRTStartup) implementation for GCC/MinGW.
Description
-----------*Nocrt0* is a custom C startup code without any dependencies of the standard C runtime
libraries. It is intended for building very small executable files under OS Windows(R).
*Nocrt0* was successfully tested with *GCC/MinGW*, *Pelles C* and *TinyCC*.Using nocrt0
------------There are two modules: *nocrt0w* for GUI applications, and *nocrt0c* for console
applications. Simply add the correct file into your project and build it without linking
to the default C startup code (hint: for GCC you will need `-nostartfiles` or `-nostdlib`
option). Alternatively, you can #include it right into any of your other C source files.The process of building *nocrt0* can also be controlled with the following DEFINEs:
-D_UNICODE
-DNOSTDLIB
-DARGV={builtin | msvcrt | shell32 | none}`-D_UNICODE` builds "wide" version of the startup code (`wmain` or `wWinMain`).
`-DNOSTDLIB` when defined compiles built-in implementation of `_alloca()` and
`__chkstk()`. You might need it if you don't link with *libgcc.a*.`-DARGV` is used for a console application (nocrt0c) only. It selects the type of the
underlying implementation of the standard command-line parser (argc/argv). `builtin`
(default) is the built-in implementation; `msvcrt` makes use of an external function
`__getmainargs()` (which is normally imported from *msvcrt.dll*); `shell32` relies on
`CommandLineToArgvW()` function from *shell32.dll*; `none` is for applications that do
not need any command-line processing (`int main(void)`).