|
73 / 74 / 4
Регистрация: 25.09.2012
Сообщений: 211
|
||
Подключение SDL.h к проекту06.03.2015, 12:55. Показов 11840. Ответов 6
Метки нет (Все метки)
Доброго времени суток, уважаемые форумчане.
Я пытаюсь скомпилировать готовый проект вот отсюда: https://github.com/chaotika86/... source-lib Использую для этого компилятор g++ и инструкцию, приведенную там же: Кликните здесь для просмотра всего текста
Compilation ------------------------ The bare lib depends only on the standard C/C++ library. If you want to see some action, the small program stored in main.cpp depends on SDL. Compilation is quite straightforward: g++ -I./ main.cpp source/resource.cpp source/resource_image.cpp source/resource_string.cpp source/resource_tech.cpp source/resource_palette.cpp -I/usr/include/SDL -lSDL -o demo You'll need to change the hardcoded path in main.cpp source file. And to run, demo need two numerical parameters: - first one is the index of the image inside the data file - second one is the index of the palette used to render the image itself Я создал в проекте директорию /usr/include/SDL и скопировал туда содержимое SDL библиотеки для разработчиков http://www.libsdl.org/download-1.2.php - .h .lib и .dll файлы. Теперь, если я пытаюсь скомпилировать проект по инструкции разработчика командой
Кликните здесь для просмотра всего текста
In file included from include/resource.h:1,
from main.cpp:1: include/common.h:8: SDL.h: No such file or directory In file included from include/resource.h:1, from include/resource_string.h:1, from main.cpp:2: include/common.h:8: SDL.h: No such file or directory In file included from include/resource.h:1, from include/resource_image.h:1, from main.cpp:3: include/common.h:8: SDL.h: No such file or directory In file included from include/resource.h:1, from include/resource_palette.h:1, from main.cpp:4: include/common.h:8: SDL.h: No such file or directory In file included from include/resource.h:1, from include/resource_tech.h:1, from main.cpp:5: include/common.h:8: SDL.h: No such file or directory In file included from .\include/resource.h:1, from source/resource.cpp:1: .\include/common.h:8: SDL.h: No such file or directory In file included from .\include/resource.h:1, from .\include/resource_image.h:1, from source/resource.cpp:4: .\include/common.h:8: SDL.h: No such file or directory In file included from .\include/resource.h:1, from .\include/resource_string.h:1, from source/resource.cpp:5: .\include/common.h:8: SDL.h: No such file or directory In file included from .\include/resource.h:1, from .\include/resource_palette.h:1, from source/resource.cpp:6: .\include/common.h:8: SDL.h: No such file or directory In file included from .\include/resource.h:1, from .\include/resource_tech.h:1, from source/resource.cpp:7: .\include/common.h:8: SDL.h: No such file or directory In file included from .\include/resource.h:1, from .\include/resource_image.h:1, from source/resource_image.cpp:1: .\include/common.h:8: SDL.h: No such file or directory In file included from .\include/resource.h:1, from .\include/resource_string.h:1, from source/resource_string.cpp:1: .\include/common.h:8: SDL.h: No such file or directory In file included from .\include/resource.h:1, from .\include/resource_tech.h:1, from source/resource_tech.cpp:1: .\include/common.h:8: SDL.h: No such file or directory In file included from .\include/resource.h:1, from .\include/resource_palette.h:1, from source/resource_palette.cpp:1: .\include/common.h:8: SDL.h: No such file or directory Я так понимаю, что нужно изменить какой-то путь в main.cpp или добавить путь ко всей библиотеке SDL, но как именно это сделать я не могу разобраться. Подскажите, как скомпилировать этот проект без ошибок или в каком направлении двигаться - мне кажется, что решение простое, но я его не вижу, т.к. знаком с плюсами довольно поверхностно. Заранее благодарю. Здесь все используемые мной ресурсы: openpax-master.zip - чистый проект с гитхаба SDL-devel-1.2.15-VC.zip - библиотека SDL openpax-master.7z - так выглядит проект у меня на компьютере. P.S. g++ я устанавливал отсюда, если это важно: http://completepascal.blogspot... ndows.html
0
|
||
| 06.03.2015, 12:55 | |
|
Ответы с готовыми решениями:
6
Подключение SDL 2.0 MinGW Подключение wininet.h к проекту Подключение С библиотеки (.so) к проекту С++ |
|
859 / 448 / 112
Регистрация: 06.07.2013
Сообщений: 1,491
|
|
| 06.03.2015, 12:57 | |
|
Скажите в какой именно папке находится sdl.h
прямо в /usr/include/SDL ? если там то можно попробовать прописать директорию полностью в опциях не относительно а что то типа -IС:/projects/../usr/include/SDL
1
|
|
|
73 / 74 / 4
Регистрация: 25.09.2012
Сообщений: 211
|
||
| 06.03.2015, 12:58 [ТС] | ||
0
|
||
|
859 / 448 / 112
Регистрация: 06.07.2013
Сообщений: 1,491
|
|
| 06.03.2015, 13:03 | |
|
как в файле resource.h и common.h и подобных подключается SDL - надо так #include <SDL.h> именно в таких скобках
1
|
|
|
73 / 74 / 4
Регистрация: 25.09.2012
Сообщений: 211
|
||
| 06.03.2015, 13:13 [ТС] | ||
|
Кликните здесь для просмотра всего текста
In file included from C:\openpax-master\resource-lib\usr\include\SDL\SDL_main.h:
26, from C:\openpax-master\resource-lib\usr\include\SDL\SDL.h:30, from main.cpp:1: C:\openpax-master\resource-lib\usr\include\SDL\SDL_stdinc.h:68: stdint.h: No suc h file or directory In file included from C:\openpax-master\resource-lib\usr\include\SDL\SDL_main.h: 26, from C:\openpax-master\resource-lib\usr\include\SDL\SDL.h:30, from .\include/common.h:8, from .\include/resource.h:1, from source/resource.cpp:1: C:\openpax-master\resource-lib\usr\include\SDL\SDL_stdinc.h:68: stdint.h: No suc h file or directory In file included from C:\openpax-master\resource-lib\usr\include\SDL\SDL_main.h: 26, from C:\openpax-master\resource-lib\usr\include\SDL\SDL.h:30, from .\include/common.h:8, from .\include/resource.h:1, from .\include/resource_image.h:1, from source/resource_image.cpp:1: C:\openpax-master\resource-lib\usr\include\SDL\SDL_stdinc.h:68: stdint.h: No suc h file or directory In file included from C:\openpax-master\resource-lib\usr\include\SDL\SDL_main.h: 26, from C:\openpax-master\resource-lib\usr\include\SDL\SDL.h:30, from .\include/common.h:8, from .\include/resource.h:1, from .\include/resource_string.h:1, from source/resource_string.cpp:1: C:\openpax-master\resource-lib\usr\include\SDL\SDL_stdinc.h:68: stdint.h: No suc h file or directory In file included from C:\openpax-master\resource-lib\usr\include\SDL\SDL_main.h: 26, from C:\openpax-master\resource-lib\usr\include\SDL\SDL.h:30, from .\include/common.h:8, from .\include/resource.h:1, from .\include/resource_tech.h:1, from source/resource_tech.cpp:1: C:\openpax-master\resource-lib\usr\include\SDL\SDL_stdinc.h:68: stdint.h: No suc h file or directory In file included from C:\openpax-master\resource-lib\usr\include\SDL\SDL_main.h: 26, from C:\openpax-master\resource-lib\usr\include\SDL\SDL.h:30, from .\include/common.h:8, from .\include/resource.h:1, from .\include/resource_palette.h:1, from source/resource_palette.cpp:1: C:\openpax-master\resource-lib\usr\include\SDL\SDL_stdinc.h:68: stdint.h: No suc h file or directory
0
|
||
|
859 / 448 / 112
Регистрация: 06.07.2013
Сообщений: 1,491
|
||
| 06.03.2015, 13:48 | ||
|
stdint.h помоему стандартный файл вообще, он должен идти вместе с G++ странно что его не видно
Добавлено через 9 минут нужна версия SDL-Mingw или SGL-GCC как то так
1
|
||
|
73 / 74 / 4
Регистрация: 25.09.2012
Сообщений: 211
|
||
| 06.03.2015, 15:24 [ТС] | ||
|
0
|
||
| 06.03.2015, 15:24 | |
|
Помогаю со студенческими работами здесь
7
Подключение к проекту jpg
Подключение dll (C++) к проекту VB 6.0 Как вывести текст на экран, используя библиотеку SDL TTF для SDL 2? Подключение dll к проекту в visual studio Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |
|
Новые блоги и статьи
|
|||
|
My Business CRM
MaGz GoLd 16.04.2026
Всем привет, недавно возникла потребность создать CRM, для личных нужд. Собственно программа предоставляет из себя базу данных клиентов, в которой можно фиксировать звонки, стадии сделки, а также. . .
|
Знаешь почему 90% людей редко бывают счастливыми?
kumehtar 14.04.2026
Потому что они ждут. Ждут выходных, ждут отпуска, ждут удачного момента. . .
а удачный момент так и не приходит.
|
Фиксация колонок в отчете СКД
Maks 14.04.2026
Фиксация колонок в СКД отчета типа Таблица.
Задача: зафиксировать три левых колонки в отчете.
Процедура ПриКомпоновкеРезультата(ДокументРезультат, ДанныеРасшифровки, СтандартнаяОбработка)
/ / . . .
|
Настройки VS Code
Loafer 13.04.2026
{
"cmake. configureOnOpen": false,
"diffEditor. ignoreTrimWhitespace": true,
"editor. guides. bracketPairs": "active",
"extensions. ignoreRecommendations": true,
. . .
|
|
Оптимизация кода на разграничение прав доступа к элементам формы
Maks 13.04.2026
Алгоритм из решения ниже реализован на нетиповом документе, разработанного в конфигурации КА2.
Задачи, как таковой, поставлено не было, проделанное ниже исключительно моя инициатива.
Было так:. . .
|
Контроль заполнения и очистка дат в зависимости от значения перечислений
Maks 12.04.2026
Алгоритм из решения ниже реализован на примере нетипового документа "ПланированиеПерсонала", разработанного в конфигурации КА2.
Задача: реализовать контроль корректности заполнения дат назначения. . .
|
Архитектура слоя интернета для сервера-слоя.
Hrethgir 11.04.2026
В продолжение https:/ / www. cyberforum. ru/ blogs/ 223907/ 10860. html
Знаешь что я подумал? Раз мы все источники пишем в голове ветки, то ничего не мешает добавить в голову такой источник, который сам. . .
|
Подстановка значения реквизита справочника в табличную часть документа
Maks 10.04.2026
Алгоритм из решения ниже реализован на примере нетипового документа "ПланированиеПерсонала", разработанного в конфигурации КА2.
Задача №1: при указании работ (справочник РаботыПоРемонтуСпецтехники),. . .
|