0

I downloaded the FreeImage library (https://freeimage.sourceforge.io/download.html), and now I can't add it to my project. I need someone to tell me with details how to do it, that is, where I put the files .dll, .h and .lib, and what settings I need to make in visual studio C#.

If anyone can help me, it would be amazing.

  • Typically all you need to do is right click on your project in VS, select "Add References" and browse to the dll(s) that you need to reference. You don't need to "install" them to VS. – Broots Waymb Feb 18 '22 at 14:01
  • Does this answer your question? [How to add a .dll reference to a project in Visual Studio](https://stackoverflow.com/questions/12992286/how-to-add-a-dll-reference-to-a-project-in-visual-studio) – Broots Waymb Feb 18 '22 at 14:02
  • So, but when I do that this message appears: Could not add the reference. Ensure the file is accessible, that it is a valid assembly or COM component – Maria Clara Feb 18 '22 at 14:50

1 Answers1

0

Copy FreeImage.dll from the Dist folder in the Zip file to C:\Windows\System32 (C:\Windows\SysWOW64 for x64 bit operating systems)

Copy FreeImage.lib from the Dist folder in the Zip file to C:\Program Files(x86)\Microsoft Visual Studio #\VC\Lib

Copy FreeImage.h,FreeImageIO.h from the Dist folder in the Zip file to C:\Program Files(x86)\Microsoft Visual Studio #\VC\Include

You can also refer to this page. https://www.cosc.brocku.ca/Offerings/3P98/course/OpenGL/3P98Examples/glut_tutorial/glutinstall.html

Jingmiao Xu-MSFT
  • 2,076
  • 1
  • 3
  • 10