• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2922
  • Last Modified:

gltest.obj : error LNK2001: unresolved external symbol __imp__ilLoadImage@4

Hi All!!

I installed a library called DevIL that is intended to manage images.

I configured MSVC++ with the following settings:
1. project->c++ settings->category: Code Generation
2. project->c++ settigns->use runtime library: Multithreaded DLL

I am sure that the code is correct because it's the working example the guys give us to try (this code gives me exactly the same error as my application).
Something is wrong because it doesn't link:

Compiling...
gltest.c
Linking...
gltest.obj : error LNK2001: unresolved external symbol __imp__ilLoadImage@4
gltest.obj : error LNK2001: unresolved external symbol __imp__ilBindImage@4
gltest.obj : error LNK2001: unresolved external symbol __imp__ilGenImages@8
gltest.obj : error LNK2001: unresolved external symbol __imp__ilutEnable@4
gltest.obj : error LNK2001: unresolved external symbol __imp__ilEnable@4
gltest.obj : error LNK2001: unresolved external symbol __imp__ilInit@0
gltest.obj : error LNK2001: unresolved external symbol __imp__ilGetInteger@4
gltest.obj : error LNK2001: unresolved external symbol __imp__ilDeleteImages@8
gltest.obj : error LNK2001: unresolved external symbol __imp__ilutGLBindTexImage@0
gltest.obj : error LNK2001: unresolved external symbol __imp__ilutRenderer@4
Debug/test.exe : fatal error LNK1120: 10 unresolved externals
Error executing link.exe.

test.exe - 11 error(s), 0 warning(s)

Thanks!
0
joao_ye
Asked:
joao_ye
1 Solution
 
waysideCommented:
You have to tell Visual Studio to link against the library you installed:

(for VC++,net) project settings->linker->input->additional dependencies

add in the devIL library that you must link against.
0
 
skiritis13Commented:
Are you using VC++ .NET?

If so try Project->Properties->Linker->Additional Dependencies
In the Additional Dependencies field type the libraries ( .lib files ) your library is using.

Aftert that try Tools->Options->Projects->VC++ Directories
In that window, in Show directories for:
1) Choose Include files: there, add the directory the devIL's headers ( .h files ) are.
2) Choose Library files: there, add the directory that devIL's library ( .lib files ) are.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now