1 / 1 / 0
Регистрация: 06.12.2013
Сообщений: 105
|
||||||
1 | ||||||
Code::Blocks 17.12 и MinGW (последний)16.06.2018, 14:12. Просмотров 3484. Ответов 3
Метки нет Все метки)
(
Всем привет!
Скачал Code::Blocks (codeblocks-17.12mingw-setup.exe), написал простенькую программку - Кликните здесь для просмотра всего текста
попытался скомпилировать, выдает ошибку об отсутствии "strsafe.h". Посмотрел - действительно, в mingw, идущем вместе с CB такой файл отсутствует. Ок, качаю последний mingw 8.1.0 (i686-8.1.0-release-win32-sjlj-rt_v6-rev0.7z), распаковываю его в папку с CB, в его настройках прописываю пути к инклюдам и либам по этой инструкции, компилирую, и получаю такие ошибки: Кликните здесь для просмотра всего текста
||=== Build: Release in TestCB (compiler: MinGW Compiler) ===| C:\Program Files (x86)\CodeBlocks\mingw32\mingw32\include\winbase.h|1041|warn ing: "InterlockedCompareExchangePointer" redefined| C:\Program Files (x86)\CodeBlocks\mingw32\mingw32\include\winnt.h|2208|note: this is the location of the previous definition| ld.exe||cannot find crt2.o: No such file or directory| ||error: ld returned 1 exit status| ||=== Build failed: 2 error(s), 1 warning(s) (0 minute(s), 1 second(s)) ===| Кликните здесь для просмотра всего текста
-------------- Clean: Release in TestCB (compiler: MinGW Compiler)--------------- Cleaned "TestCB - Release" -------------- Build: Release in TestCB (compiler: MinGW Compiler)--------------- g++.exe -I"C:\Program Files (x86)\CodeBlocks\mingw32\include" -I"C:\Program Files (x86)\CodeBlocks\mingw32\mingw32\include" -c C:\Users\W0LF\Dropbox\src\CPP\TestCB\main.cpp -o obj\Release\main.o g++.exe -L"C:\Program Files (x86)\CodeBlocks\mingw32\mingw32\lib" -L"C:\Program Files (x86)\CodeBlocks\mingw32\mingw32\lib64" -L"C:\Program Files (x86)\CodeBlocks\mingw32\lib\gcc\i686-w64-mingw32\8.1.0" -o bin\Release\TestCB.exe obj\Release\main.o -s -lgdi32 -luser32 -lkernel32 -lcomctl32 -mwindows In file included from C:\Program Files (x86)\CodeBlocks\mingw32\mingw32\include/windows.h:70, from C:\Users\W0LF\Dropbox\src\CPP\TestCB\main.cpp:1: C:\Program Files (x86)\CodeBlocks\mingw32\mingw32\include/winbase.h:1041: warning: "InterlockedCompareExchangePointer" redefined #define InterlockedCompareExchangePointer __InlineInterlockedCompareExchangePointer In file included from C:\Program Files (x86)\CodeBlocks\mingw32\mingw32\include/minwindef.h:163, from C:\Program Files (x86)\CodeBlocks\mingw32\mingw32\include/windef.h:8, from C:\Program Files (x86)\CodeBlocks\mingw32\mingw32\include/windows.h:69, from C:\Users\W0LF\Dropbox\src\CPP\TestCB\main.cpp:1: C:\Program Files (x86)\CodeBlocks\mingw32\mingw32\include/winnt.h:2208: note: this is the location of the previous definition #define InterlockedCompareExchangePointer(Destination, ExChange, Comperand) (PVOID) (LONG_PTR)InterlockedCompareExchange ((LONG volatile *) (Destination),(LONG) (LONG_PTR) (ExChange),(LONG) (LONG_PTR) (Comperand)) C:\Program Files (x86)\CodeBlocks\mingw32\bin/ld.exe: cannot find crt2.o: No such file or directory collect2.exe: error: ld returned 1 exit status Process terminated with status 1 (0 minute(s), 1 second(s)) 2 error(s), 1 warning(s) (0 minute(s), 1 second(s)) Чё ему надо?
0
|
|
16.06.2018, 14:12 | |
SFML, MinGW 5.2.0, Code::blocks
Ошибка в Code::Blocks |
|
398 / 137 / 44
Регистрация: 02.06.2016
Сообщений: 308
|
|
19.06.2018, 14:20 | 3 |
![]() Решение
Распаковывайте отдельно.
Папку можете переименовать, я специально название сохранил, чтобы видно было, что именно ваша версия.
1
|
1 / 1 / 0
Регистрация: 06.12.2013
Сообщений: 105
|
|
20.06.2018, 19:50 [ТС] | 4 |
Да, так получилось. Причем никаких путей, ни к инклюдам, ни к либам не прописывал. Сам всё нашел. Спасибо.
0
|
20.06.2018, 19:50 | |
Заказываю контрольные, курсовые, дипломные и любые другие студенческие работы здесь или здесь. Как настроить Code::Blocks? Создание проектов на C и C++ в Code::Blocks Code::Blocks Не работает GDB Code::Blocks 13.12 не находит компилятор Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |