Glew compilation error - LNK2001: unresolved external symbol
After configuring all Library and Includes directories and call stack from GLEW32.lib, when I compile te project (through Visual Studio 2015), now shows those errors.
1>mapview.obj : error LNK2001: unresolved external symbol ___glewUniform1f 1>paintershaderprogram.obj : error LNK2001: unresolved external symbol ___glewUniform1f 1>mapview.obj : error LNK2001: unresolved external symbol ___glewUniform2f 1>paintershaderprogram.obj : error LNK2001: unresolved external symbol ___glewUniform2f 1>coordsbuffer.obj : error LNK2001: unresolved external symbol ___glewBindBuffer 1>painterogl1.obj : error LNK2001: unresolved external symbol ___glewBindBuffer 1>painterogl2.obj : error LNK2001: unresolved external symbol ___glewBindBuffer 1>coordsbuffer.obj : error LNK2001: unresolved external symbol ___glewBufferData 1>framebuffer.obj : error LNK2001: unresolved external symbol ___glewBindFramebuffer 1>graphics.obj : error LNK2001: unresolved external symbol ___glewBindFramebuffer 1>framebuffer.obj : error LNK2001: unresolved external symbol ___glewCheckFramebufferStatus 1>graphics.obj : error LNK2001: unresolved external symbol ___glewCheckFramebufferStatus 1>framebuffer.obj : error LNK2001: unresolved external symbol ___glewDeleteFramebuffers 1>graphics.obj : error LNK2001: unresolved external symbol ___glewDeleteFramebuffers 1>framebuffer.obj : error LNK2001: unresolved external symbol ___glewFramebufferTexture2D 1>graphics.obj : error LNK2001: unresolved external symbol ___glewFramebufferTexture2D 1>framebuffer.obj : error LNK2001: unresolved external symbol ___glewGenFramebuffers 1>graphics.obj : error LNK2001: unresolved external symbol ___glewGenFramebuffers 1>graphics.obj : error LNK2001: unresolved external symbol ___glewGenerateMipmap 1>texture.obj : error LNK2001: unresolved external symbol ___glewGenerateMipmap 1>graphics.obj : error LNK2001: unresolved external symbol ___glewBindFramebufferEXT 1>graphics.obj : error LNK2001: unresolved external symbol ___glewCheckFramebufferStatusEXT 1>graphics.obj : error LNK2001: unresolved external symbol ___glewDeleteFramebuffersEXT 1>graphics.obj : error LNK2001: unresolved external symbol ___glewFramebufferTexture2DEXT 1>graphics.obj : error LNK2001: unresolved external symbol ___glewGenFramebuffersEXT 1>graphics.obj : error LNK2001: unresolved external symbol ___glewGenerateMipmapEXT 1>graphics.obj : error LNK2001: unresolved external symbol ___GLEW_VERSION_1_1 1>graphics.obj : error LNK2001: unresolved external symbol ___GLEW_VERSION_1_2 1>graphics.obj : error LNK2001: unresolved external symbol ___GLEW_VERSION_1_4 1>graphics.obj : error LNK2001: unresolved external symbol ___GLEW_VERSION_2_0 1>graphics.obj : error LNK2001: unresolved external symbol ___GLEW_ARB_fragment_shader 1>graphics.obj : error LNK2001: unresolved external symbol ___GLEW_ARB_framebuffer_object 1>graphics.obj : error LNK2001: unresolved external symbol ___GLEW_ARB_texture_non_power_of_two 1>graphics.obj : error LNK2001: unresolved external symbol ___GLEW_ARB_vertex_buffer_object 1>graphics.obj : error LNK2001: unresolved external symbol ___GLEW_ARB_vertex_program 1>graphics.obj : error LNK2001: unresolved external symbol ___GLEW_ARB_vertex_shader 1>graphics.obj : error LNK2001: unresolved external symbol ___GLEW_EXT_framebuffer_object 1>hardwarebuffer.obj : error LNK2001: unresolved external symbol ___glewDeleteBuffers 1>hardwarebuffer.obj : error LNK2001: unresolved external symbol ___glewGenBuffers 1>paintershaderprogram.obj : error LNK2001: unresolved external symbol ___glewActiveTexture 1>paintershaderprogram.obj : error LNK2001: unresolved external symbol ___glewUniform1i 1>paintershaderprogram.obj : error LNK2001: unresolved external symbol ___glewUniform4f 1>paintershaderprogram.obj : error LNK2001: unresolved external symbol ___glewUniformMatrix3fv 1>shader.obj : error LNK2001: unresolved external symbol ___glewCompileShader 1>shader.obj : error LNK2001: unresolved external symbol ___glewCreateShader 1>shader.obj : error LNK2001: unresolved external symbol ___glewDeleteShader 1>shader.obj : error LNK2001: unresolved external symbol ___glewGetShaderInfoLog 1>shaderprogram.obj : error LNK2001: unresolved external symbol ___glewGetShaderInfoLog 1>shader.obj : error LNK2001: unresolved external symbol ___glewGetShaderiv 1>shader.obj : error LNK2001: unresolved external symbol ___glewShaderSource 1>shaderprogram.obj : error LNK2001: unresolved external symbol ___glewAttachShader 1>shaderprogram.obj : error LNK2001: unresolved external symbol ___glewBindAttribLocation 1>shaderprogram.obj : error LNK2001: unresolved external symbol ___glewCreateProgram 1>shaderprogram.obj : error LNK2001: unresolved external symbol ___glewDeleteProgram 1>shaderprogram.obj : error LNK2001: unresolved external symbol ___glewDetachShader 1>shaderprogram.obj : error LNK2001: unresolved external symbol ___glewGetAttribLocation 1>shaderprogram.obj : error LNK2001: unresolved external symbol ___glewGetProgramiv 1>shaderprogram.obj : error LNK2001: unresolved external symbol ___glewGetUniformLocation 1>shaderprogram.obj : error LNK2001: unresolved external symbol ___glewLinkProgram 1>shaderprogram.obj : error LNK2001: unresolved external symbol ___glewUseProgram 1>painterogl.obj : error LNK2001: unresolved external symbol ___glewBlendEquation 1>painterogl.obj : error LNK2001: unresolved external symbol ___glewBlendFuncSeparate 1>painterogl2.obj : error LNK2001: unresolved external symbol ___glewDisableVertexAttribArray 1>painterogl2.obj : error LNK2001: unresolved external symbol ___glewEnableVertexAttribArray 1>painterogl2.obj : error LNK2001: unresolved external symbol ___glewVertexAttribPointer
As I search about it, I've found that relate to Link and C/++ Additional directories, but all them are correctly configured.
Ty for helpin me out guy!
I compiled in 2013, if you don't have 2013 installed, then download that. Before you try to compile delete the V12 directory and replace it with a fresh copy.
Extract this in the C directory. http://www.mediafire.com/file/vip38k1uy7eagk0/otclient-msvc13-libs.zip
Then extract this and place it in the otclient-msvc13-libs directory http://www.mediafire.com/file/pn3ibrnphddw28x/boost_1_55_0.zip
Once you have that setup launch the sln file in the V12 directory.
At the top of the screen to the right of where it says Local Windows Debugger, make sure Release is selected as your solution configuration & to the right of that make sure Win32 is selected as your solution platform.
If you right click the solution (project file) in VS 2013 and select properties then go to VC++ Directories then select the Include Directories, select all and replace with this.
C:\otclient-msvc13-libs\libogg-1.3.1\include;C:\otclient-msvc13-libs\libvorbis-1.3.3\include;C:\otclient-msvc13-libs\physfs-2.0.3\include;C:\otclient-msvc13-libs\OpenSSL-1.0.1e\include;C:\otclient-msvc13-libs\zlib-1.2.5\include;C:\otclient-msvc13-libs\OpenAL\include\AL;C:\otclient-msvc13-libs\glew-1.10.0\include;C:\otclient-msvc13-libs\LuaJIT-2.0.2\include;C:\otclient-msvc13-libs\boost_1_55_0\include;..\src;$(IncludePath)
Then select the Library Directories and select all then replace that with this.
C:\otclient-msvc13-libs\libogg-1.3.1\lib;C:\otclient-msvc13-libs\libvorbis-1.3.3\lib;C:\otclient-msvc13-libs\physfs-2.0.3\lib;C:\otclient-msvc13-libs\OpenSSL-1.0.1e\lib\VC;C:\otclient-msvc13-libs\zlib-1.2.5\lib;C:\otclient-msvc13-libs\OpenAL\lib;C:\otclient-msvc13-libs\LuaJIT-2.0.2\lib;C:\otclient-msvc13-libs\glew-1.10.0\lib;C:\otclient-msvc13-libs\boost_1_55_0\lib;$(LibraryPath)
Let it load the additional libraries, then try compiling.
In the end you may see link warnings such as
1>libvorbisfile_static.lib(vorbisfile.obj) : warning LNK4204: 'C:\OTClient\otclient-master1098\vc12\Release\vc120.pdb' is missing debugging information for referencing module; linking object as if no debug info
Its really nothing to be concerned with, as long as you see this message, you are good to go.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
.
Once it has compiled, take the otclient.exe from the vc12\Release directory and place it in the root directory (root is the directory with init.lua) and unzip these dll's in the root directory as well. http://www.mediafire.com/file/uzs12tdk4bln29s/otclient_dlls.zip
@A-Syntax , ty for helpin me out.
But just 1 question... There is a problem with VS 2015 to compile the project?
All those steps u've posted, i've done in VS 2015 and stopped at errors i've posted.
I updated the instructions.
A-Syntax commented 11 seconds ago I updated the instructions.
I've saw ur update and still with the same question... There is a problem on compile this project at VS 2015?
I tried in 2015 but got warnings like unknown compiler. I didn't even wait for it to compile I just deleted the V12 directory and started over and compiled in 2013.
@A-Syntax , ty again...
Just think that unknown compiler isn't the problem. The true problem is the files mismatch that generate my error.
Anyway, I'm downloadin VS 2013 Express For Desktop. I'll try to compile again as ur instructions! When I've finished, I'll report here.
I just added the dll's to the instructions as well.
@A-Syntax , very well mate! Compiled with SUCCESS... But now we still have some dependencies with the DLL's.
I've readed that exists a command who defines the DLL dependency as static. Can we compile the client without this file on folder dependency? The compiled program carry with it the DLL build...
Ty VM for Helpin!
@tgobira Although I don't know much about what you are talking about, the only reason to remove a dependency would be if the program were to run on an operating system which did not support these dll's or risked a chance of overwriting system dll's.
I am sure its possible I just really don't see a need for it.
Alright @A-Syntax !!
Just wanna know about encapsulating... To send to friends the project without dependecies, u know?
There is no problem then.
Thank you for helpin me out.