Модераторы: Rickert
  

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> Настройка компилятора на DirectX, программируем с Андре Ламотом 
:(
    Опции темы
Animator
  Дата 27.6.2007, 20:16 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 61
Регистрация: 7.5.2007

Репутация: нет
Всего: 0



У меня появилось желание научится азам программирования игр. Купил книгу Андре Ламота "Программирование трёхмерных игр для Windows"(тут наверное каждый второй её юзал). Установил Visual Studio 6(до этого программил в Dev C++), DXSDK, сделал всё как написано в книге: добавил .lib-файлы в список связывания, настроил пути поиска include-файлов и скопировал в рабочий каталог библиотеки игровых модулей(те кто читал меня поймут). 

И что ж вышло: Выдаёт ошибку: Cannot compile file t3dlib.h ; no compile tool is associated width the file extension.

И ещё вот этот странный списочек ошибок. (я проверял подключаемые файлы ---- там нет никаких символов @)

Код

--------------------Configuration: RT - Win32 Debug--------------------
Linking...
y.obj : error LNK2001: unresolved external symbol "int window_client_y0" (?window_client_y0@@3HA)
y.obj : error LNK2001: unresolved external symbol "int window_client_x0" (?window_client_x0@@3HA)
y.obj : error LNK2001: unresolved external symbol "unsigned short (__cdecl* RGB16Bit)(int,int,int)" (?RGB16Bit@@3P6AGHHH@ZA)
y.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl Start_Clock(void)" (?Start_Clock@@YAKXZ)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DMusic_Play(int)" (?DMusic_Play@@YAHH@Z)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DMusic_Load_MIDI(char *)" (?DMusic_Load_MIDI@@YAHPAD@Z)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DMusic_Init(void)" (?DMusic_Init@@YAHXZ)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DSound_Load_WAV(char *,int)" (?DSound_Load_WAV@@YAHPADH@Z)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DSound_Init(void)" (?DSound_Init@@YAHXZ)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DInput_Init_Keyboard(void)" (?DInput_Init_Keyboard@@YAHXZ)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DInput_Init(void)" (?DInput_Init@@YAHXZ)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Init(int,int,int,int)" (?DDraw_Init@@YAHHHHH@Z)
y.obj : error LNK2001: unresolved external symbol "int __cdecl Open_Error_File(char *,struct _iobuf *)" (?Open_Error_File@@YAHPADPAU_iobuf@@@Z)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Shutdown(void)" (?DDraw_Shutdown@@YAHXZ)
y.obj : error LNK2001: unresolved external symbol "void __cdecl DInput_Shutdown(void)" (?DInput_Shutdown@@YAXXZ)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DMusic_Shutdown(void)" (?DMusic_Shutdown@@YAHXZ)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DMusic_Delete_All_MIDI(void)" (?DMusic_Delete_All_MIDI@@YAHXZ)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DSound_Shutdown(void)" (?DSound_Shutdown@@YAHXZ)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DSound_Stop_All_Sounds(void)" (?DSound_Stop_All_Sounds@@YAHXZ)
y.obj : error LNK2001: unresolved external symbol "int __cdecl Draw_Clip_Line16(int,int,int,int,int,unsigned char *,int)" (?Draw_Clip_Line16@@YAHHHHHHPAEH@Z)
y.obj : error LNK2001: unresolved external symbol "unsigned char * back_buffer" (?back_buffer@@3PAEA)
y.obj : error LNK2001: unresolved external symbol "int back_lpitch" (?back_lpitch@@3HA)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DSound_Play(int,int,int,int,int)" (?DSound_Play@@YAHHHHHH@Z)
y.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl Wait_Clock(unsigned long)" (?Wait_Clock@@YAKK@Z)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Flip(void)" (?DDraw_Flip@@YAHXZ)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DMusic_Status_MIDI(int)" (?DMusic_Status_MIDI@@YAHH@Z)
y.obj : error LNK2001: unresolved external symbol "int __cdecl Draw_Text_GDI(char *,int,int,unsigned long,struct IDirectDrawSurface7 *)" (?Draw_Text_GDI@@YAHPADHHKPAUIDirectDrawSurface7@@@Z)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Unlock_Back_Surface(void)" (?DDraw_Unlock_Back_Surface@@YAHXZ)
y.obj : error LNK2001: unresolved external symbol "unsigned char * __cdecl DDraw_Lock_Back_Surface(void)" (?DDraw_Lock_Back_Surface@@YAPAEXZ)
y.obj : error LNK2001: unresolved external symbol "unsigned char * keyboard_state" (?keyboard_state@@3PAEA)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DInput_Read_Keyboard(void)" (?DInput_Read_Keyboard@@YAHXZ)
y.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Fill_Surface(struct IDirectDrawSurface7 *,unsigned short,struct tagRECT *)" (?DDraw_Fill_Surface@@YAHPAUIDirectDrawSurface7@@GPAUtagRECT@@@Z)
y.obj : error LNK2001: unresolved external symbol "struct IDirectDrawSurface7 * lpddsback" (?lpddsback@@3PAUIDirectDrawSurface7@@A)
Debug/RT.exe : fatal error LNK1120: 33 unresolved externals
Error executing link.exe.

RT.exe - 34 error(s), 0 warning(s)


Те кто прошёл через всё это помогите плиз.
PM MAIL ICQ   Вверх
arilou
Дата 28.6.2007, 09:13 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Великий МунаБудвин
****


Профиль
Группа: Экс. модератор
Сообщений: 2646
Регистрация: 15.7.2004
Где: город-герой Минск

Репутация: 6
Всего: 61



1) По ходу у тебя не подключены библиотеки
2) Почему оно у тебя пытается откомпилировать .h файл,


--------------------
user posted imageuser posted image
PM WWW ICQ   Вверх
Animator
Дата 28.6.2007, 16:14 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 61
Регистрация: 7.5.2007

Репутация: нет
Всего: 0



Откомпилировал в Visual Studio 8 выдаёт уже другой список ошибок:

Код

------ Build started: Project: Prol, Configuration: Debug Win32 ------
Compiling...
raiders3d.cpp
e:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(222) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5940) : error C2146: syntax error : missing ';' before identifier 'Buffer'
e:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
e:\program files\microsoft visual studio 8\vc\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(272) : error C2440: '=' : cannot convert from 'const char [11]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(289) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [11]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(363) : warning C4244: 'return' : conversion from 'WPARAM' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(423) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(424) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(425) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(545) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(621) : warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(622) : warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(623) : warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(624) : warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(675) : warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(676) : warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(704) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(705) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(709) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(710) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(711) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(781) : warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(805) : warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(806) : warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(807) : warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(808) : warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(843) : warning C4244: '+=' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(983) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
e:\documents and settings\andrewjobs\мои документы\visual studio 2005\projects\prol\prol\raiders3d.cpp(984) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
Build log was saved at "file://e:\Documents and Settings\AndrewJobs\Мои документы\Visual Studio 2005\Projects\Prol\Prol\Debug\BuildLog.htm"
Prol - 6 error(s), 24 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



Причём что интересно: файл winnt.h шёл вместе с компилятором.
PM MAIL ICQ   Вверх
dereyly
Дата 28.6.2007, 20:59 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Бывалый
*


Профиль
Группа: Участник
Сообщений: 217
Регистрация: 16.6.2006

Репутация: 2
Всего: 4



попробуй прописать в настройках...
Tools -> Options -> Projects and Solutions -> VC++ Directories 

вместо
$(Какая-тоSDK)\Include
$(Какая-тоSDK)\Lib\x86

//кажется это $(VSInstallDir) но точно не помню 
соответсвенно на прямой путь

H:\Program Files\Microsoft DirectX SDK (December 2006)\Include
H:\Program Files\Microsoft DirectX SDK (December 2006)\Lib\x86

2. Ну если arilou прав то нужно отключить precompiled headers
// это находится в свойствах проекта 
//propirties ->Configuration Propirties -> C/C++ -> Precompiled Headers- >  Not Using Precompiled Headers

Это сообщение отредактировал(а) dereyly - 28.6.2007, 21:08
PM MAIL   Вверх
bifrein
Дата 26.11.2011, 02:36 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 1
Регистрация: 26.11.2011
Где: Ukraine

Репутация: нет
Всего: нет



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

1) Надо создать новый проект File>New>Project>Win32 Application>An empty project>Finish>OK.
2) На вкладке FileView добавить все файлы в проект: Add Files to Project>*.cpp, *.h, *.wav, *.mid, *.bmp, *.pal
3) Project>Settings>Link>Object/library modules>ddraw.lib dsound.lib dinput.lib dinput8.lib winmm.lib
4) Добавить пути поисков заголовочных и .LIB файлов (в самый верх списка) Tools>Options>Directories>[Include files | Library files]>New... 
5) Build>Rebuild All
6) Ctrl+F5

P.S. Экзешник и аудио файлы должны лежать в одной папке, иначе звука не будет.
P.P.S. ошибок нет, но предупреждений много... smile

Это сообщение отредактировал(а) bifrein - 5.2.2013, 03:26
PM MAIL Skype   Вверх
zhasmin2004
Дата 12.4.2012, 11:14 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 2
Регистрация: 15.3.2010

Репутация: нет
Всего: нет



DirectX SDK устанавливаешь и он сам всё настроит.
PM MAIL   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
Правила форума "Программирование игр, графики и искуственного интеллекта"
Rickert

НА ЗЛОБУ ДНЯ: Дорогие посетители, прошу обратить внимание что новые темы касающиеся новых вопросов создаются кнопкой "Новая тема" а не "Ответить"! Любые оффтопиковые вопросы, заданные в текущих тематических темах будут удалены а их авторы, при рецедиве, забанены.

  • Литературу, связанную с программированием графики, обсуждаем здесь
  • Действия модераторов можно обсудить здесь
  • С просьбами о написании курсовой, реферата и т.п. обращаться сюда
  • Вопросы связанные с программированием графики и мультимедии на языках С++ и Delphi
  • Вопросы по реализации алгоритмов рассматриваются здесь

Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, Rickert.

 
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | Программирование игр, графики и искусственного интеллекта | Следующая тема »


 




[ Время генерации скрипта: 0.0803 ]   [ Использовано запросов: 21 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.