LNK1104 cannot open file 'k4a::k4a.lib'

1.2k Views Asked by At

I want to run this example from azure kinect sdk and have a problem in building. I am using cmake to build but it can't find target libraries.

Error Lines :

Target "transformation_example" links to target "k4a::k4a" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
This warning is for project developers. Use -Wno-dev to suppress it.

Target "transformation_example" links to target "k4a::k4arecord" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
This warning is for project developers. Use -Wno-dev to suppress it

Target "transformation_example" links to target "libjpeg-turbo::libjpeg-turbo" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? This warning is for project developers. Use -Wno-dev to suppress it.

After this steps, I still opened the solution window in visual studio. As you can see, header files are missing.

enter image description here

After using nugget to install sdk, and adding turbojpeh include.dir, then i think, have no problem with them.

enter image description here

And now, when i try to build, i see the following error:

enter image description here

Additional dependencies: enter image description here

I'm sorry, not familiar with visual studio. What should I do?

OS : Windows 10 SDK Version: 1.4.0 Current Firmware Versions: RGB camera firmware: 1.6.98 Depth camera firmware: 1.6.70 Depth config file: 6109.7

1

There are 1 best solutions below

0
On BEST ANSWER

Sorry to see the question so late. I encountered the same problem and I am not familiar with visual studio either. Just modify the "k4a::k4a.lib" to "k4a.lib" in your project properties -> Linker -> Input -> Additional dependencies as the screenshot showed wiil simply solve such problem. (Of course you have to make sure that your lib files are correctly linked as stated in the official documentation).

I am a Chinese with all Chinese in my software interface, and my English is not particularly good. Hope it won't cause misunderstanding. Regardless of whether you have solved this problem or not, I hope to help people who have the same problem.

The highlighted ones in this screenshot are the places that need to be modified