Git Product home page Git Product logo

Comments (6)

knightcrawler25 avatar knightcrawler25 commented on June 6, 2024

Can you send a screenshot of the linker options:

image

Can you also try deleting the build folder and run these 3 commands one after the other and share the entire output?

mkdir build
cmake -G "Visual Studio 17 2022" -A x64 . -B build
cmake --build build --config Release

from glsl-pathtracer.

jlk1997 avatar jlk1997 commented on June 6, 2024

image
thx a lot .I tried again, but it didn't work. Maybe it's a library conflict, but I'm not sure what I want to do. For now, maybe it's a library conflict between x64 and x86

from glsl-pathtracer.

jlk1997 avatar jlk1997 commented on June 6, 2024

its my entire output after the 3 commands
gl3w.c
gl3w.obj : error LNK2019: 无法解析的外部符号 __imp_wglGetProcAddress,函数 gl3wGetProcAddress 中引用了该符号 [E:\GLSL-PathTracer-master\bu
ild\PathTracer.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\lib\x64\opengl32.lib : warning LNK427
2: 库计算机类型“x86”与目标计算机类型“x64”冲突 [E:\GLSL-PathTracer-master\build\PathTracer.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\lib\x64\glu32.lib : warning LNK4272:
库计算机类型“x86”与目标计算机类型“x64”冲突 [E:\GLSL-PathTracer-master\build\PathTracer.vcxproj]
E:\GLSL-PathTracer-master\build\PathTracer.exe : fatal error LNK1120: 1 个无法解析的外部命令 [E:\GLSL-PathTracer-master\build\PathTracer.vcxproj]
image

from glsl-pathtracer.

knightcrawler25 avatar knightcrawler25 commented on June 6, 2024

My VS 2022 gets the opengl32.lib and glu32.lib from the Windows SDK lib folder
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x64 (SDK version might be different from what you have installed)

I'm not sure how, but the opengl32.lib and glu32.lib that you have in the following folders seem to be 32 bit versions of the library and not 64 bit. Try taking a backup, removing them from the folder, build again and see if VS is still able link correctly

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\lib\x64\opengl32.lib
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\lib\x64\glu32.lib

If linking fails, try re-installing windows SDK (https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/)

from glsl-pathtracer.

jlk1997 avatar jlk1997 commented on June 6, 2024

ohhhhhhh!!!!!!why??!!!After delete opengl32. Lib and Glu32. Lib, the program runs successfully! But I removed these two static libraries under vs, the project is where to find the relative static library??
By the way,its a cool coool coooool project,I will be very serious to study this set of engineering, thank you!!!!!!

from glsl-pathtracer.

knightcrawler25 avatar knightcrawler25 commented on June 6, 2024

After deleting the .lib files, your VS probably picks another one from the default Windows SDK path. Anyway, glad to hear that the issue is fixed now :)

from glsl-pathtracer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.