С Новым годом! Форум программистов, компьютерный форум, киберфорум
Наши страницы

С++ для начинающих

Войти
Регистрация
Восстановить пароль
 
madonzy
0 / 0 / 0
Регистрация: 05.10.2013
Сообщений: 65
#1

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

06.05.2014, 18:19. Просмотров 653. Ответов 7
Метки нет (Все метки)

Всем привет!
Столкнулся с потребностью использовать библиотеку 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;
}
Не знаю даже что делать, сижу я, как видно выше, под виндой.
Надеюсь тут мне помогут. Заранее благодарю!
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
Similar
Эксперт
41792 / 34177 / 6122
Регистрация: 12.04.2006
Сообщений: 57,940
06.05.2014, 18:19
Здравствуйте! Я подобрал для вас темы с ответами на вопрос Привязать opengl к MinGW (C++):

MinGW + OpenGL - C++
Как прикрутить OpenGL к MinGW(C++)? Это вообще реально? Сколько перепробовал, не работает(Не исключаю &quot;прямоту&quot; своих рук). После...

Может ли MinGW x64 компилить приложения x32? Или нужно для этого отдельно ещё MinGW х32 качать? - C++
Просто решил поиграться с CodeLite.

Mingw-w64 MinGW TDM-GCC - C++
Всем привет. Хочу понять, существует ли принципиальная разница между Mingw-w64, MinGW и TDM-GCC? Какие плюсы/минусы у этих трех...

freeglut, MinGW - C++
Не получается мне в IDE работать. Прочитал несколько туториалов, не помогло Сделал, все, как тут указано. Скачал freeglut-2.8.0 для...

Mingw studio - C++
Мне очень нравится Mingw Studio, не хотелось бы переходить на другую среду, но недавно узнал, что вшитая версия компилятора там...

компилятор mingw - C++
Установил Dev-Cpp попробовал скомпилировать проект.Вот такая штука на экране.Ясно что дело не в коде.пробовал разные среды разработки...

7
Progers
New to C++
83 / 44 / 5
Регистрация: 14.01.2013
Сообщений: 258
06.05.2014, 18:24 #2
http://lazyfoo.net/tutorials/OpenGL/...ingw/index.php
0
madonzy
0 / 0 / 0
Регистрация: 05.10.2013
Сообщений: 65
06.05.2014, 18:42  [ТС] #3
Цитата Сообщение от Progers Посмотреть сообщение
http://lazyfoo.net/tutorials/OpenGL/...ingw/index.php
Был на этом сайте. Не помогло!

Добавлено через 17 минут
У меня не установлен MSVC может в этом проблема?
0
GLS
2 / 2 / 1
Регистрация: 10.02.2014
Сообщений: 34
06.05.2014, 18:46 #4
c:\MinGW\lib\libglut32.a на месте?
Лучше code::blocks используй.
0
Kuzia domovenok
2060 / 1905 / 174
Регистрация: 25.03.2012
Сообщений: 6,565
Записей в блоге: 1
06.05.2014, 18:47 #5
судя по сообщениям, проблема не с OpenGL а с заголовочными файлами stdlib.h, malloc.h и.т.д.
переименуй тему
0
madonzy
0 / 0 / 0
Регистрация: 05.10.2013
Сообщений: 65
06.05.2014, 19:02  [ТС] #6
Цитата Сообщение от GLS Посмотреть сообщение
c:\MinGW\lib\libglut32.a на месте?
нет(

Добавлено через 29 секунд
Цитата Сообщение от madonzy Посмотреть сообщение
У меня не установлен MSVC может в этом проблема?
???

Добавлено через 13 минут
Цитата Сообщение от Progers Посмотреть сообщение
http://lazyfoo.net/tutorials/OpenGL/...ingw/index.php
снова попробовал и вот что выводит:
Код
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\mingw_dev_lib\freeglut\lib/libfreeGLUT.a when searching for -lfreeGLUT
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\mingw_dev_lib\freeglut\lib\libfreeGLUT.a when searching for -lfreeGLUT
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\mingw_dev_lib\freeglut\lib/libfreeGLUT.a when searching for -lfreeGLUT
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lfreeGLUT
collect2: ld returned 1 exit status
0
GLS
2 / 2 / 1
Регистрация: 10.02.2014
Сообщений: 34
06.05.2014, 19:07 #7
во по теме Using freeglut or GLUT with MinGW
0
madonzy
0 / 0 / 0
Регистрация: 05.10.2013
Сообщений: 65
06.05.2014, 19:17  [ТС] #8
однако не по теме...
0
06.05.2014, 19:17
MoreAnswers
Эксперт
37091 / 29110 / 5898
Регистрация: 17.06.2006
Сообщений: 43,301
06.05.2014, 19:17
Привет! Вот еще темы с ответами:

Notepad ++ и MinGW - C++
Здравствуйте, у меня возник вопрос, как можно интегрировать notepad++ и mingw ? Заранее спасибо!

MinGW mysql - C++
Здравствуйте, объясните пожалуйста как заставить компилятор g++ работать с функциями mysql, нужен пример компиляции у меня ничего не...

MinGW + Netbeans - C++
Здравствуйте. Помогите, пожалуйста, разобраться с проблемками. Первая проблема заключается в том, что я добавил свой каталог библиотек, но...

Mingw и windows.h - C++
Возникла ошибка в том что mingw определяет мою систему без unicode, а windows.h как unicode, и например при обращение к ф-ции...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
8
Ответ Создать тему
Опции темы

КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.