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

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

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

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

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

C++ WinApi и MinGW
C++ Notepad ++ и MinGW
C++ MinGW + Netbeans
freeglut, MinGW C++
C++ MinGW mysql
компилятор mingw C++
C++ Mingw studio
После регистрации реклама в сообщениях будет скрыта и будут доступны все возможности форума.
Progers
New to C++
 Аватар для Progers
83 / 44 / 5
Регистрация: 14.01.2013
Сообщений: 258
06.05.2014, 18:24     Привязать opengl к MinGW #2
http://lazyfoo.net/tutorials/OpenGL/...ingw/index.php
madonzy
0 / 0 / 0
Регистрация: 05.10.2013
Сообщений: 65
06.05.2014, 18:42  [ТС]     Привязать opengl к MinGW #3
Цитата Сообщение от Progers Посмотреть сообщение
http://lazyfoo.net/tutorials/OpenGL/...ingw/index.php
Был на этом сайте. Не помогло!

Добавлено через 17 минут
У меня не установлен MSVC может в этом проблема?
GLS
2 / 2 / 1
Регистрация: 10.02.2014
Сообщений: 34
06.05.2014, 18:46     Привязать opengl к MinGW #4
c:\MinGW\lib\libglut32.a на месте?
Лучше code::blocks используй.
Kuzia domovenok
 Аватар для Kuzia domovenok
1886 / 1741 / 117
Регистрация: 25.03.2012
Сообщений: 5,916
Записей в блоге: 1
06.05.2014, 18:47     Привязать opengl к MinGW #5
судя по сообщениям, проблема не с OpenGL а с заголовочными файлами stdlib.h, malloc.h и.т.д.
переименуй тему
madonzy
0 / 0 / 0
Регистрация: 05.10.2013
Сообщений: 65
06.05.2014, 19:02  [ТС]     Привязать opengl к MinGW #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
GLS
2 / 2 / 1
Регистрация: 10.02.2014
Сообщений: 34
06.05.2014, 19:07     Привязать opengl к MinGW #7
во по теме Using freeglut or GLUT with MinGW
MoreAnswers
Эксперт
37091 / 29110 / 5898
Регистрация: 17.06.2006
Сообщений: 43,301
06.05.2014, 19:17     Привязать opengl к MinGW
Еще ссылки по теме:

MinGW + SublimeText 3 C++ C++
C++ Mingw и wxWidgets
C++ Mingw-w64 MinGW TDM-GCC
Компиляция в g++ из MinGW C++
MinGW + OpenGL C++

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

Или воспользуйтесь поиском по форуму:
madonzy
0 / 0 / 0
Регистрация: 05.10.2013
Сообщений: 65
06.05.2014, 19:17  [ТС]     Привязать opengl к MinGW #8
однако не по теме...
Yandex
Объявления
06.05.2014, 19:17     Привязать opengl к MinGW
Ответ Создать тему
Опции темы

Текущее время: 20:00. Часовой пояс GMT +3.
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Рейтинг@Mail.ru