Re[2]: посоветуйте IDE для gcc
От: maks1180  
Дата: 28.12.21 12:51
Оценка:
M>>1) что-то не получилось его настроить на MinGW gcc

Получается что QT Creator не может без make компилировать ?
Code Blocks например может.
===============================================
(реклама, удалена модератором)
Re[3]: посоветуйте IDE для gcc
От: AeroSun  
Дата: 28.12.21 13:08
Оценка:
Здравствуйте, maks1180, Вы писали:

M>Code Blocks например может.


Ну так используй его
Бери его или что-то ещё из копролитов а-ля ultimate++
Re[3]: посоветуйте IDE для gcc
От: Skorodum Россия  
Дата: 28.12.21 13:24
Оценка:
Здравствуйте, maks1180, Вы писали:

M>Получается что QT Creator не может без make компилировать ?

1. Qt Creator
2. Может, например с qbs, там нет этапа генерации Makefile. Make вообще сейчас редко используется, ninja более популярен.
Re[3]: посоветуйте IDE для gcc
От: velkin Удмуртия http://blogs.rsdn.org/effective/
Дата: 28.12.21 14:24
Оценка:
Здравствуйте, maks1180, Вы писали:

M>Получается что QT Creator не может без make компилировать ?

M>Code Blocks например может.

Вот смотри, make это не что-то абстрактное, это утилита в составе компилятора, того же gcc или mingw. Она там лежит в папке bin.

M>Ищет файл mingw32-make.exe в папке MinGW не находит его и на этом всё

C:/Qt/Qt5.9.9/Tools/mingw530_32/bin/mingw32-make.exe --help
Usage: mingw32-make [options] [target] ...
Options:
  -b, -m                      Ignored for compatibility.
  -B, --always-make           Unconditionally make all targets.
  -C DIRECTORY, --directory=DIRECTORY
                              Change to DIRECTORY before doing anything.
  -d                          Print lots of debugging information.
  --debug[=FLAGS]             Print various types of debugging information.
  -e, --environment-overrides
                              Environment variables override makefiles.
  --eval=STRING               Evaluate STRING as a makefile statement.                                    
  -f FILE, --file=FILE, --makefile=FILE                                                                   
                              Read FILE as a makefile.                                                    
  -h, --help                  Print this message and exit.                                                
  -i, --ignore-errors         Ignore errors from recipes.                                                 
  -I DIRECTORY, --include-dir=DIRECTORY                                                                   
                              Search DIRECTORY for included makefiles.                                    
  -j [N], --jobs[=N]          Allow N jobs at once; infinite jobs with no arg.                            
  -k, --keep-going            Keep going when some targets can't be made.                                 
  -l [N], --load-average[=N], --max-load[=N]                                                              
                              Don't start multiple jobs unless load is below N.                           
  -L, --check-symlink-times   Use the latest mtime between symlinks and target.                           
  -n, --just-print, --dry-run, --recon                                                                    
                              Don't actually run any recipe; just print them.                             
  -o FILE, --old-file=FILE, --assume-old=FILE                                                             
                              Consider FILE to be very old and don't remake it.                           
  -O[TYPE], --output-sync[=TYPE]                                                                          
                              Synchronize output of parallel jobs by TYPE.                                
  -p, --print-data-base       Print make's internal database.                                             
  -q, --question              Run no recipe; exit status says if up to date.
  -r, --no-builtin-rules      Disable the built-in implicit rules.
  -R, --no-builtin-variables  Disable the built-in variable settings.
  -s, --silent, --quiet       Don't echo recipes.
  -S, --no-keep-going, --stop
                              Turns off -k.
  -t, --touch                 Touch targets instead of remaking them.
  --trace                     Print tracing information.
  -v, --version               Print the version number of make and exit.
  -w, --print-directory       Print the current directory.
  --no-print-directory        Turn off -w, even if it was turned on implicitly.
  -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
                              Consider FILE to be infinitely new.
  --warn-undefined-variables  Warn when an undefined variable is referenced.

This program built for i686-w64-mingw32
Report bugs to <bug-make@gnu.org>

IDE ничего не может, она изначально ссылается на компилятор. Там просто есть надстройка над компилятором или лучше сказать тупой вызов консольных команд.

Возьми вот это: https://download.qt.io/archive/qt/5.9/5.9.9/qt-opensource-windows-x86-5.9.9.exe
Зарегистрируйся на сайте, за это денег не возьмут, и установи.

Скачай и почитай вот это если интересно.
GCC: Настольная книга пользователей, программистов и системных администраторов.Гриффитс Артур

qmake это тоже не нечто абстрактное:
C:/Qt/Qt5.9.9/5.9.9/mingw53_32/bin/qmake.exe
Но систем сборки может быть много, фактически это нужно для файлов проекта, для qmake это *.pro.
QMake has two modes, one mode for generating project files based on
some heuristics, and the other for generating makefiles. Normally you
shouldn't need to specify a mode, as makefile generation is the default
mode for qmake, but you may use this to test qmake on an existing project

Mode:
  -project       Put qmake into project file generation mode
                 In this mode qmake interprets files as files to
                 be built,
                 defaults to *; *; *; *.ts; *.xlf; *.qrc
                 Note: The created .pro file probably will 
                 need to be edited. For example add the QT variable to 
                 specify what modules are required.
  -makefile      Put qmake into makefile generation mode (default)
                 In this mode qmake interprets files as project files to
                 be processed, if skipped qmake will try to find a project
                 file in your current working directory

Warnings Options:
  -Wnone         Turn off all warnings; specific ones may be re-enabled by
                 later -W options
  -Wall          Turn on all warnings
  -Wparser       Turn on parser warnings
  -Wlogic        Turn on logic warnings (on by default)
  -Wdeprecated   Turn on deprecation warnings (on by default)

Options:
   * You can place any variable assignment in options and it will be *
   * processed as if it was in [files]. These assignments will be    *
   * processed before [files] by default.                            *
  -o file        Write output to file
  -d             Increase debug level
  -t templ       Overrides TEMPLATE as templ
  -tp prefix     Overrides TEMPLATE so that prefix is prefixed into the value
  -help          This help
  -v             Version information
  -early         All subsequent variable assignments will be
                 parsed right before default_pre.prf
  -before        All subsequent variable assignments will be
                 parsed right before [files] (the default)
  -after         All subsequent variable assignments will be
                 parsed after [files]
  -late          All subsequent variable assignments will be
                 parsed right after default_post.prf
  -norecursive   Don't do a recursive search
  -recursive     Do a recursive search
  -set <prop> <value> Set persistent property
  -unset <prop>  Unset persistent property
  -query <prop>  Query persistent property. Show all if <prop> is empty.
  -qtconf file   Use file instead of looking for qt.conf
  -cache file    Use file as cache           [makefile mode only]
  -spec spec     Use spec as QMAKESPEC       [makefile mode only]
  -nocache       Don't use a cache file      [makefile mode only]
  -nodepend      Don't generate dependencies [makefile mode only]
  -nomoc         Don't generate moc targets  [makefile mode only]
  -nopwd         Don't look for files in pwd [project mode only]

У Visual Studio есть свои решения. Есть что-то более универсальное, вроде cmake.

В предыдущем комментарии я дал ссылку на Шлее. Можешь открыть файл проекта file.pro в QtCreator, а можешь запустить вот так (из книги):
qmake.exe file.pro -o Makefile

qmake -project
qmake
make

По нормальному во многих книгах часто дают сначала консольные команды с параметрами вызывающие различные утилиты компиляторов чтобы человек хоть что-то понял. Ты сейчас идёшь по обратному пути, включаешь IDE, а потом не понимаешь, почему не работает или наоборот работает. Да я в принципе так же делал. Запускаешь компиляцию, тебе IDE даже начинает выдавать запускаемые команды, но на это не обращаешь внимания.

В общем я дал ссылки на две книги, качай и читай. Скомпилируй проект из консоли без IDE. Посмотри про GCC, если уж заинтересовался. Если тебе неинтересно читать, то тут уж ничего не поделаешь. И тут правильно сказали, если тебе понравился Code::Blocks, используй его. Там свои файлы проекта.

Файл проекта test.cbp
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
    <FileVersion major="1" minor="6" />
    <Project>
        <Option title="test" />
        <Option pch_mode="2" />
        <Option compiler="gcc" />
        <Build>
            <Target title="Debug">
                <Option output="bin/Debug/test" prefix_auto="1" extension_auto="1" />
                <Option object_output="obj/Debug/" />
                <Option type="1" />
                <Option compiler="gcc" />
                <Compiler>
                    <Add option="-g" />
                </Compiler>
            </Target>
            <Target title="Release">
                <Option output="bin/Release/test" prefix_auto="1" extension_auto="1" />
                <Option object_output="obj/Release/" />
                <Option type="1" />
                <Option compiler="gcc" />
                <Compiler>
                    <Add option="-O2" />
                </Compiler>
                <Linker>
                    <Add option="-s" />
                </Linker>
            </Target>
        </Build>
        <Compiler>
            <Add option="-Wall" />
            <Add option="-fexceptions" />
        </Compiler>
        <Unit filename="main.cpp" />
        <Extensions>
            <envvars />
            <code_completion />
            <debugger />
            <lib_finder disable_auto="1" />
        </Extensions>
    </Project>
</CodeBlocks_project_file>

Логи компиляции
-------------- Clean: Debug in test (compiler: GNU GCC Compiler)---------------

Cleaned "test - Debug"

-------------- Build: Debug in test (compiler: GNU GCC Compiler)---------------

g++ -Wall -fexceptions -g  -c /mnt/data_00/archive/test/main.cpp -o obj/Debug/main.o
g++  -o bin/Debug/test obj/Debug/main.o   
Output file is bin/Debug/test with size 28.58 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))

Это Debian, не хочу переходить в винду, но смотри:
g++ -Wall -fexceptions -g  -c /mnt/data_00/archive/test/main.cpp -o obj/Debug/main.o
g++  -o bin/Debug/test obj/Debug/main.o

Вот так Code::Blocks и скомпилировала мне тестовый консольный проект. А ты ищешь какие-то мнимые преимущества, есть там make и makefile, или нет. Люди от IDE обычно ждут автодополнение кода и прочие вспомогательные фичи. Опять же многие используют Qt, и выбор QtCreator логичен.

С другой стороны может тебе это неинтересно, что опять же не исключает использования QtCreator. Но можно и в других IDE сидеть и даже в консольном редакторе. Через консоль можно даже отлаживать. Тебе будут приходить сообщения ошибки по номеру строки и надо будет туда сходить и исправить.
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.