Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

asking some info about C

Featured Replies

  • Author
  • Localization

Shokoniraya, posted Fri Feb 05, 2021 12:12 pm (62026)


im trying to learn c (old and classic C, not c or c#)
my question is that where can i find a set of full documents about header files (.h files for #include)?

i'm also using tcc (tiny c compiler), but i found out that this compiler has some minor problems, is there any portable c compiler that i can keep it in flash drive without any installation? what complier should i use?

note: sorry for my bad grammar
  • Author
  • Localization

peter2005, posted Fri Feb 05, 2021 4:54 pm (62033)


As a compiler you may try PellesC
  • Author
  • Localization

Shokoniraya, posted Fri Feb 05, 2021 5:58 pm (62034)


peter2005 wrote:
As a compiler you may try PellesC

thank you for your answer
i also need to know that all of complied c codes (compiled to exe or dll) can run stand-alone or not, i choosed tcc at first, because it was stand-alone and not reqired any runtime (maybe this is a stupid question since c is free-module and its up to programmer code that may required external libraries), but for example, C# needs runtime to work
  • Author
  • Localization

peter2005, posted Fri Feb 05, 2021 9:35 pm (62038)


Shokoniraya wrote:
peter2005 wrote:
As a compiler you may try PellesC

thank you for your answer
i also need to know that all of complied c codes (compiled to exe or dll) can run stand-alone or not, i choosed tcc at first, because it was stand-alone and not reqired any runtime (maybe this is a stupid question since c is free-module and its up to programmer code that may required external libraries), but for example, C# needs runtime to work


I checked my compiled files, there is by default only kernel32.dll dependency.
  • Author
  • Localization

atom0s, posted Sat Feb 06, 2021 1:09 am (62043)


You can find an archived copy of the final draft for the current C standard (C17) here for free:
https://web.archive.org/web/20181230041 ... d_fdis.pdf

This covers literally everything to know about the language, as it is the standards for C.

Shokoniraya wrote:
i also need to know that all of complied c codes (compiled to exe or dll) can run stand-alone or not


For C and C , this depends on your compiler/link being used. If they offer static linking, then you can statically link to the runtime being used which will make your apps / dlls able to run without needing a separate runtime. This is not dependent on the language itself.
  • Author
  • Localization

aluigi, posted Wed Feb 10, 2021 9:28 pm (62116)


And if you use gcc remember to ever add -static to the command you use for building.
Personally I also like -mtune=generic that makes your exe compatible with older CPUs and -m32 to make it 32bit (for retro-compatibility with old WinXP/7).

If curious, the following are the main gcc switches I use for building quickbms:
Quote:
-s -O2 -Wl,--enable-stdcall-fixup -Wl,--large-address-aware -mtune=generic -fno-unit-at-a-time -m32 -Wl,--stack,4194304 -fstack-protector-all -Wstack-protector -fwrapv --param ssp-buffer-size=1 -fno-strict-overflow -Wformat-security -Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-auto-image-base -Wl,--enable-auto-import -fno-omit-frame-pointer -static -Wall

They are used for smaller exe size, optimized instructions, stack security, larger stack, dynamic locations and so on.

Older versions of gcc create smaller executables.
  • Author
  • Localization

Shokoniraya, posted Thu Feb 25, 2021 6:15 pm (62486)


sir aluigi, i want to know that is there any portable gcc?
  • Author
  • Localization

aluigi, posted Fri Feb 26, 2021 9:33 am (62499)


gcc is multiplatform and on Windows it's called Mingw gcc.
What you need is using MSYS2:
https://www.msys2.org/

It's a complete setup made with packages (pacman) so it's super easy to install and update everything everytime you desire.
Additionally it runs the latest version of gcc 10 and has both 32bit (mingw32) and 64bit (mingw64) versions.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.