I am trying to make an audio player in visual c++.I am using an audio engine called FMOD which is in a dll to call functions from it for audio playback. How do i import a .dll file to visual c++

Recommended Answers

All 3 Replies

use the lib file to do linking and at runtime it will load the DLL. Just add the .lib file to linker and .h to project and there you go. I use CodeLite so I cannot help on VC++

Hello

What evironment are you running in eg. VS2008/2020 CLR / MFC?

Milton

You may find " Linking an Executable to a Dll " from MSDN helpful.

Depending on what version of VS you are using (this is for 2008): You can got to Project Settings > Properties > Configuration Properties > Linker > Input

Under Additional Dependencies add "Fmod.lib" to anything that is already there. You can also skip this step by using:

#pragma comment( lib, "Fmod.lib" )

Remember to add the lib and headers to your project and to include the header files when you are using the functionality.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.