Форум программистов, компьютерный форум CyberForum.ru

Привязать opengl к MinGW - C++

Восстановить пароль Регистрация
Другие темы раздела
C++ Указатель и инициализация объекта класса http://www.cyberforum.ru/cpp-beginners/thread1168266.html
Здраствуйте! Имеется большой класс импортирующий данные из файлов 3D-модели. В моём приложении он будет инициализироваться один раз для каждой отдельной модели, а потом в цикле будут тянуться из него данные для отображения этих моделей. Возник вопрос как лучше инициализировать каждый объект этого класса? Сразу создавать указатель: ModelOBJ *terrain = new ModelOBJ;...
C++ Дана последовательность целых чисел. заменить все простые числа на х дана последовательность целых чисел. заменить все простые числа на х #include "iostream" #include "algorithm" #include "vector" using namespace std; bool pred(int x) { int k=0; for(int i=2; i<=x/2; i++) http://www.cyberforum.ru/cpp-beginners/thread1168244.html
C++ Сортировка одномерного массива
Дан одномерный массив А, состоящий из N элементов. Отсортировать все его элементы а) улучшенным методом пузырька; б) методом прямого включения
C++ Для каждой строки матрицы подсчитать сумму элементов, вне заданного интервала, записать данные в новый массив
Дан массив размером n×n, элементы которого целые числа. Замечание. Для хранения массив n×n использовать ступенчатый массив. Для каждой строки подсчитать сумму элементов, не попадающих в заданный интервал, и записать данные в новый массив.
C++ Найти максимум из модулей элементов последовательности действительных чисел http://www.cyberforum.ru/cpp-beginners/thread1168219.html
Дана последовательность из n действительных чисел. Замечание. Задачи из данного пункта решить, используя одномерный массив. Найти максимум из модулей элементов.
C++ Дана последовательность целых чисел. Вывести на экран номера всех элементов, не попадающих в заданный интервал Дана последовательность целых чисел. Замечание. Задачи из данного пункта решить двумя способами, используя одномерный массив, а затем двумерный. Размерность массива вводится с клавиатуры. Вывести на экран номера всех элементов, не попадающих в заданный интервал. подробнее

Показать сообщение отдельно
madonzy
0 / 0 / 0
Регистрация: 05.10.2013
Сообщений: 65
06.05.2014, 18:19     Привязать opengl к MinGW
Всем привет!
Столкнулся с потребностью использовать библиотеку OpenGL на С++. Но так как я не работаю ни под одной IDE, а банально пишу в текстовом редакторе, вынужден всё делать самостоятельно. Но как бы я не пытался, у меня не получается прикрепить OpenGL к своему компилятору MinGW. Искал в гугле, читал около 10 разных способов, но ни один не дает нужного результата.

В cmd я ввожу команду:
Код
g++ -o snake.exe -Wall snake.cpp glut32.lib -lopengl32 -lglu32
Вот что выводит stderr:
Код
In file included from snake.cpp:1:0:
c:\MinGW\include\GL\glut.h:58:0: warning: ignoring #pragma comment  [-Wunknown-pragmas]
c:\MinGW\include\GL\glut.h:66:0: warning: ignoring #pragma comment  [-Wunknown-pragmas]
c:\MinGW\include\GL\glut.h:67:0: warning: ignoring #pragma comment  [-Wunknown-pragmas]
c:\MinGW\include\GL\glut.h:68:0: warning: ignoring #pragma comment  [-Wunknown-pragmas]
c:\MinGW\include\GL\glut.h:76:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
c:\MinGW\include\GL\glut.h:77:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
c:\MinGW\include\GL\glut.h:50:24: error: redeclaration of C++ built-in type 'wchar_t' [-fpermissive]
In file included from snake.cpp:3:0:
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:129:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:130:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:143:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:151:10: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:152:10: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:236:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:237:3: error: '_CRTIMP' does not name a type
In file included from snake.cpp:3:0:
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:303:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:321:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:337:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:339:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:350:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:351:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:352:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:353:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:354:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:355:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:356:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:357:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:358:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:360:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:362:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:363:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:364:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:365:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:366:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:368:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:370:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:372:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:398:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:400:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:402:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:407:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:409:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:411:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:419:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:426:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:427:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:431:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:432:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:433:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:434:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:435:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:441:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:442:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:443:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:455:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:457:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:459:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:460:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:463:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:465:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:466:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:467:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:468:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:469:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:470:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:472:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:473:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:474:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:475:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:476:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:477:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:478:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:479:21: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:484:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:485:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:486:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:487:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:488:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:489:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:490:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:491:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:492:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:493:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:508:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:515:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:533:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:534:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:535:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:539:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:540:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:543:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:545:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:546:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:547:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:550:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:552:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:553:3: error: '_CRTIMP' does not name a type
In file included from c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:634:0,
                 from snake.cpp:3:
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:17:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:18:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:19:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:20:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:21:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:22:3: error: '_CRTIMP' does not name a type
In file included from c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:634:0,
                 from snake.cpp:3:
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:23:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:24:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:25:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:26:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:27:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:31:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:32:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:33:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:34:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:35:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:36:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:37:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:41:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:42:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:43:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:44:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:45:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:46:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:47:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:51:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:52:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:53:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/sec_api/stdlib_s.h:54:3: error: '_CRTIMP' does not name a type
In file included from c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/stdlib.h:635:0,
                 from snake.cpp:3:
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:110:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:111:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:113:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:114:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:121:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:122:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:123:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:124:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:125:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:126:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:127:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:128:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:129:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:130:3: error: '_CRTIMP' does not name a type
c:\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/include/malloc.h:131:3: error: '_CRTIMP' does not name a type
c:\MinGW\include\GL\glut.h:549:21: warning: 'int glutCreateMenu_ATEXIT_HACK(void (*)(int))' defined but not used [-Wunused-function]
ну а вот сам код:

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <c:\MinGW\include\GL\glut.h>
 
#include <stdlib.h>
 
void draw(void)
{
    glClearColor(1,0,0,1);
    glClear(GL_COLOR_BUFFER_BIT );
    glutPostRedisplay();
    glFlush();
}
 
void keyboard(unsigned char key, int x, int y) {
    switch(key) {
        case 27:
            exit(0);
    }
}
 
int main(int argc, char **argv)
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA );
    glutInitWindowPosition(100,100);
    glutInitWindowSize(400,400);
    glutCreateWindow("Red window");
    glutDisplayFunc(draw);
    glutKeyboardFunc(keyboard);
    glutMainLoop();
    return 0;
}
Не знаю даже что делать, сижу я, как видно выше, под виндой.
Надеюсь тут мне помогут. Заранее благодарю!
После регистрации реклама в сообщениях будет скрыта и будут доступны все возможности форума.
 
Текущее время: 00:52. Часовой пояс GMT +3.
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Рейтинг@Mail.ru