Using gcc to compile C file - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Using gcc to compile C file (/showthread.php?tid=2604) |
Using gcc to compile C file - aurel - 04-18-2024 hi is it possible to use gcc from qb64 internal\c-compiler\bin to compile C file ? maybe with Notepad++ ? any clue ? i am lazy to download whole MingW RE: Using gcc to compile C file - a740g - 04-18-2024 You can. Assuming you are in the QB64pe directory, simply run gcc like: .\internal\c\c_compiler\bin\gcc Or you could just use the absolute path. RE: Using gcc to compile C file - Kernelpanic - 04-18-2024 Quote:i am lazy to download whole MingW@aurel - You don't have to download it, a program does it. When I read "i am lazy to . . ." this is what comes to mind: Der Struwwelpeter/Die Geschichte vom Suppen-Kaspar RE: Using gcc to compile C file - aurel - 04-19-2024 Heh OK But yes ..i really mean ...why download and install mingw IF i already have it in QB64pe folder... what you posted is image on imgbb is simply to small so again ...do i use Notepad++ to force gcc to compile C file i mean how... using ShellExecute() or with some another trick maybe ? RE: Using gcc to compile C file - aurel - 04-19-2024 Ok i found something on Stackoverflow in my case i copy whole c_compiler folder into disk D:\ "D:\c_compiler\bin\gcc.exe" "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)"\$(NAME_PART).exe" and add this to Notepad++ Run input dialog and voila my C file as test1.c is compiled into excutable RE: Using gcc to compile C file - Kernelpanic - 04-19-2024 (04-19-2024, 06:49 AM)aurel Wrote: Heh OKAs described here: https://qb64phoenix.com/forum/showthread.php?tid=2586&pid=24432#pid24432 RE: Using gcc to compile C file - aurel - 04-19-2024 Ok i don't know for this topic also why must be latest, C is a C ...not C++ which have lot of versions RE: Using gcc to compile C file - Kernelpanic - 04-19-2024 (04-19-2024, 11:47 AM)aurel Wrote: also why must be latest, C is a C ...not C++ whichFor the same reason why there are updates to QB64pe. - There are also constant updates to the C compilers, not just for C++. Once because of improvements, and then when there are changes to the norm. *)You can delete the C stuff in QB64. To program in C/C++ you use MinGW. There are also programs that require a C compiler. *)There is a good program from . . . I can't find it right now. RE: Using gcc to compile C file - Kernelpanic - 04-19-2024 (04-19-2024, 08:12 AM)aurel Wrote: Ok i found something on StackoverflowI just noticed it now - it looks wild. If you have installed MingW, you still have to create the path so that one can call the compiler from any directory. Like This: RE: Using gcc to compile C file - JRace - 04-20-2024 The MinGW compiler installed with QB64PE is perfectly functional, so there is no need to waste several hundred megabytes of disk space on another MinGW version unless you need a specific compiler. Here's a batch file I use that allows a user to compile C or C++ programs using QB64PE's MinGW. It will invoke the appropriate compiler, GCC.EXE or G++.EXE, depending on the extension of your source file. It can be used from the command line ("CCOMP.BAT hello.c"), but it can also be used drag-and-drop style: in your file manager, drag your C file onto the compiler .BAT file. This batch file is designed to work from the QB64PE directory or from the MinGW subdirectory. Code: (Select All) @echo off |