0
votes

I'm using an SDK that I downloaded to develop an app in MSVS 2013.

When I try to build my project I get error LNK2019: unresolved external symbol _SecuAPI_Init@4 referenced in function _main D:\Documents\Visual Studio 2013\Projects\Lola\Lola\Main.obj Lola

After searching Google and the MDN I've narrowed down that I'm either using reference when I shouldn't or I've not linked the project correctly. I've looked through my code and I think it's the latter unless I'm missing something. The Docs that came with the SDK aren't clear about what to link or how to add the SDK to a project. I'm not sure if I need to add the .dll s to the project folder for the to show up under references or what.

I am planning on distributing this to other computers and I believe the licencing says it's okay to have the files on other computers for free.

I added the paths to the downloaded .lib files and inc files under Project->Properties->Linker->Additional Library Directories and Project->Properties->C/C++->Additional Include Directories respectively.

The project also came with dll files and I have done nothing with them. I tried going to Project->References->Add New Reference-Projects but nothing shows up to select.

2

2 Answers

1
votes

Under Project->Properties->Linker->Input, there is Additionial Dependencies. You usually need to indicate the name of the .lib to link to there. That should fix it.

0
votes

I think I fixed this issue although it just led to more warnings but I think those are because I was being redundant with definitions since the .lib wasn't linked correctly.

The issue was that I had just the path under Project->Properties->Linker->Input->Additional Dependencies. You have to specify the individual libraries, read add the .lib files themselves not just specify the folder they're in.

To make it easier I added the path under Linker->General->Additional Library Directories. Then I only had to add the files under Linker->Input. So I would just add myLib.lib, instead of added the whole path for each file.