简体   繁体   中英

visual studio c++ project cannot find .dll

I have downloaded the Autodesk fbx sdk and trying to build a simple console app. I have added additional directories in Linker / General / Additional Library Directories like follows:

在此处输入图像描述

see the screenshot of the directory below. There are several libs that (I suppose) I should add in dependencies, and there's also the.dll file. It's release folder (debug is another available), for x86 architecture and for VS2017 which I am using.

在此处输入图像描述

Also, I have add dependencies like below and have included the standard include folder as specified in the Autodesk manual

在此处输入图像描述

The project builds fine but shows the following when run:

Cannot run code because libfbxsdk.dll could not be found... But it is in the folder as you can see in the pic. Could you pls help?

The linker settings have nothing to do with finding DLL files at run-time. If you want this SDK to be available to all programs - which without reason to do otherwise would be my recommendation - hit the start button and search for "environment", choosing "Edit environment variables for your account". Edit the value of the PATH environment variable (adding it if necessary) to include the directories where the DLLs are located.

If you only want it to be available to this particualr program (and you don't have any other custom DLLs that need to be found) you could also change the startup directory in the project properties to the directory where the DLL files can be found (the startup directory is one of the locations in the system search path).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM