|
73 / 74 / 4
Регистрация: 25.09.2012
Сообщений: 211
|
||
Подключение SDL.h к проекту06.03.2015, 12:55. Показов 11794. Ответов 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 Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |
|
Новые блоги и статьи
|
||||
|
PhpStorm 2025.3: WSL Terminal всегда стартует в ~
and_y87 14.12.2025
PhpStorm 2025. 3: WSL Terminal всегда стартует в ~ (home), игнорируя директорию проекта
Симптом:
После обновления до PhpStorm 2025. 3 встроенный терминал WSL открывается в домашней директории. . .
|
Как объединить две одинаковые БД Access с разными данными
VikBal 11.12.2025
Помогите пожалуйста !! Как объединить 2 одинаковые БД Access с разными данными.
|
Новый ноутбук
volvo 07.12.2025
Всем привет.
По скидке в "черную пятницу" взял себе новый ноутбук Lenovo ThinkBook 16 G7 на Амазоне:
Ryzen 5 7533HS
64 Gb DDR5
1Tb NVMe
16" Full HD Display
Win11 Pro
|
Музыка, написанная Искусственным Интеллектом
volvo 04.12.2025
Всем привет. Некоторое время назад меня заинтересовало, что уже умеет ИИ в плане написания музыки для песен, и, собственно, исполнения этих самых песен. Стихов у нас много, уже вышли 4 книги, еще 3. . .
|
От async/await к виртуальным потокам в Python
IndentationError 23.11.2025
Армин Ронахер поставил под сомнение async/ await. Создатель Flask заявляет: цветные функции - провал, виртуальные потоки - решение. Не threading-динозавры, а новое поколение лёгких потоков. Откат?. . .
|
|
Поиск "дружественных имён" СОМ портов
Argus19 22.11.2025
Поиск "дружественных имён" СОМ портов
На странице:
https:/ / norseev. ru/ 2018/ 01/ 04/ comportlist_windows/
нашёл схожую тему. Там приведён код на С++, который показывает только имена СОМ портов, типа,. . .
|
Сколько Государство потратило денег на меня, обеспечивая инсулином.
Programma_Boinc 20.11.2025
Сколько Государство потратило денег на меня, обеспечивая инсулином.
Вот решила сделать интересный приблизительный подсчет, сколько государство потратило на меня денег на покупку инсулинов.
. . .
|
Ломающие изменения в C#.NStar Alpha
Etyuhibosecyu 20.11.2025
Уже можно не только тестировать, но и пользоваться C#. NStar - писать оконные приложения, содержащие надписи, кнопки, текстовые поля и даже изображения, например, моя игра "Три в ряд" написана на этом. . .
|
Мысли в слух
kumehtar 18.11.2025
Кстати, совсем недавно имел разговор на тему медитаций с людьми. И обнаружил, что они вообще не понимают что такое медитация и зачем она нужна. Самые базовые вещи. Для них это - когда просто люди. . .
|
Создание Single Page Application на фреймах
krapotkin 16.11.2025
Статья исключительно для начинающих. Подходы оригинальностью не блещут.
В век Веб все очень привыкли к дизайну Single-Page-Application .
Быстренько разберем подход "на фреймах".
Мы делаем одну. . .
|