I want to ask a question. I’m using Microsoft Visual Studio 6.0 and I was stuck in this #error. LINK : fatal error LNK1104: cannot open file "glut32.lib"
. Actually the command that I used can be run at my computer lab at my college but now I’m using my pc’s to run it. I already follow the step to install openGL in my pc’s, but it is still stuck. I hope somebody can help me. Thanks.
suspectus
16.4k8 gold badges48 silver badges57 bronze badges
asked Jul 11, 2013 at 1:17
Check your VClib
folder, is there a file called glut32.lib? If not, re-download GLUT and follow the README to put files in the right folder. Here is a link to GLUT
answered Jul 11, 2013 at 1:56
ManasManas
5983 silver badges14 bronze badges
3
C:Program Files (x86)Microsoft Visual Studio 12.0VClib
This path is for VS 2013, depending on the Visual Studio Version 11.0/12.0 will be varied
answered Oct 12, 2016 at 12:01
KHVKHV
1432 gold badges4 silver badges19 bronze badges
In my case, in visual studio 2019, it was because the solution platform was 64.
So I changed from the dropdown menu left to the |> Local Windows Debugger
t0 86 and run it again and it worked
hope this help
answered May 19, 2022 at 0:18
Dream EchoDream Echo
1462 silver badges7 bronze badges
In my case:
Right click on project name -> properties -> Configuration Manager(on top right corner) -> Select «x86» at «active solution platform»(platform win32)
===>>> Run
answered Oct 2, 2020 at 17:05
0
Copy «glut32.lib» to «C:Program Files (x86)Windows Kits8.1Libwinv6.3umx86».
answered Mar 13, 2018 at 5:19
0
I am using «CUDA bu Example» book to get started with CUDA.
But when I included all header files given by book then got ERROR as
Error 1 error LNK1104: cannot open file ‘glut32.lib’ D:bookbookLINK book
I am using Visual Studio 10
Please help me out of this
asked Jul 4, 2012 at 7:55
2
I found the same error while setting it up in Visual Studio 2010
However, I also found a fix and wanted to share it.
Just copy and paste the glut32.lib file to MicrosoftSDKs folder, as this is the default location of VC++ linker location. To be exact
C:Program Files (x86)Microsoft SDKsWindowsv7.0ALib
answered Jan 10, 2013 at 10:09
CyberpksCyberpks
1,4016 gold badges21 silver badges51 bronze badges
3
You probably have to build the «shrUtils_vs2010.sln» solution if you haven’t done it.
The file is in «path_to_SDKNVIDIA GPU Computing SDK 4.2shared» folder.
answered Jul 4, 2012 at 9:26
jgonzacjgonzac
1652 silver badges9 bronze badges
Copy the glut32.lib file from the lib folder in «cuda by example» to the folder below:
C:Program FilesNVIDIA GPU Computing ToolkitCUDAv7.5libWin32
answered Nov 16, 2015 at 19:00
1
I have tested this solution and it worked for me in visual studio 2015
1: Copy glut32.dll to your project directory (where your
source.cpp
is)
2: Copy glut.h toC:Program FilesMicrosoft Visual Studio 14.0VcIncludegl
(gl folder should be created manually)
3: Copy glut32.lib toC:Program FilesMicrosoft Visual Studio 14.0Vclib
done.
Praveen
1,7913 gold badges20 silver badges33 bronze badges
answered Sep 11, 2018 at 20:10
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
#include "stdafx.h" #include <glut.h> #include <cmath> #pragma comment( lib, "Glaux.lib" ) int r = 1; double q = 1, n = 10; const int m = 33000; double knx[m], kny[m]; void Traf(double xA, double yA, double xB, double yB, int r) { knx[r + 4] = xA; kny[r + 4] = yA; knx[r + 3] = xB; kny[r + 3] = yB; double xC = knx[r] = xA + yA - yB; double yC = kny[r] = yA + xB - xA; double xD = knx[r + 2] = xB + yA - yB; double yD = kny[r + 2] = yB + xB - xA; knx[r + 1] = (xC + xD*q*q + (yC - yD)*q) / (1 + q*q); kny[r + 1] = (yC + yD*q*q + (xD - xC)*q) / (1 + q*q); } void Fract() { Traf(-0.15, -0.5, 0.15, -0.5, 0); for (int i = 0; i < 5 * (pow(2, n) - 1); i += 5) { Traf(knx[i], kny[i], knx[i + 1], kny[i + 1], 5 * r); Traf(knx[i + 1], kny[i + 1], knx[i + 2], kny[i + 2], 5 * (r + 1)); r = r + 2; } } void Draw() { glClear(GL_COLOR_BUFFER_BIT); glColor3d(0.0, 1.0, 0.0); glLineWidth(2.0); glBegin(GL_LINES); glVertex2d(knx[3], kny[3]); glVertex2d(knx[4], kny[4]); for (int i = 0; i<5 * r; i += 5) { glVertex2d(knx[i], kny[i]); glVertex2d(knx[i + 1], kny[i + 1]); glVertex2d(knx[i], kny[i]); glVertex2d(knx[i + 2], kny[i + 2]); glVertex2d(knx[i + 1], kny[i + 1]); glVertex2d(knx[i + 2], kny[i + 2]); glVertex2d(knx[i + 2], kny[i + 2]); glVertex2d(knx[i + 3], kny[i + 3]); glVertex2d(knx[i + 4], kny[i + 4]); glVertex2d(knx[i], kny[i]); } glEnd(); glFinish(); } void main(int argc, char ** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB); glutInitWindowPosition(200, 200); glutInitWindowSize(400, 400); glutCreateWindow("Дерево Пифагора"); glClearColor(0.0, 0.0, 0.0, 1.0); Fract(); glutDisplayFunc(Draw); glScaled(1.0, 1.0, 1.0); glRotated(0.0, 0.0, 0.0, 1.0); glutMainLoop(); } |
Я хочу задать вопрос. Я использую Microsoft Visual Studio 6.0, и я застрял в этой # ошибка. LINK : fatal error LNK1104: cannot open file "glut32.lib"
, Фактически команда, которую я использовал, может быть запущена в моей компьютерной лаборатории в моем колледже, но теперь я использую свои компьютеры для ее запуска. Я уже выполнил шаг, чтобы установить openGL на мой компьютер, но он все еще застрял. Я надеюсь, что кто-нибудь может мне помочь. Благодарю.
2
Решение
Проверьте свои VClib
папка, есть ли файл с именем glut32.lib? Если нет, повторно загрузите GLUT и следуйте инструкциям README, чтобы поместить файлы в нужную папку. Вот ссылка на GLUT
6
Другие решения
C: Program Files (x86) Microsoft Visual Studio 12.0 VC lib
Этот путь для VS 2013, в зависимости от версии Visual Studio 11.0 / 12.0 будет варьироваться
2
Скопируйте «glut32.lib» в «C: Program Files (x86) Windows Kits 8.1 Lib winv6.3 um x86».
-1