Link errors, Help!!!  
Author Message
Lejing





PostPosted: Visual C++ General, Link errors, Help!!! Top

1>NVStorageInterface.obj : error LNK2019: unresolved external symbol __imp__RegCloseKey@4 referenced in function _main
1>NVStorageInterface.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _main
1>NVStorageInterface.obj : error LNK2019: unresolved external symbol __imp__RegOpenKeyExA@20 referenced in function _main
1>Release_Win32/NVStorageInterface.exe : fatal error LNK1120: 3 unresolved externals

I use the following functions in code, then I got the above errors

RegOpenKeyEx()

RegQueryValueEx()

Thank you in advance!!



Visual C++15  
 
 
Ayman Shoukry - MSFT





PostPosted: Visual C++ General, Link errors, Help!!! Top

According to http://msdn2.microsoft.com/en-us/library/ms724897.aspx, you need to link with Advapi32.lib. If that still doesn't work then you might find a more detailed answer at the win32 newsgroups at http://msdn.microsoft.com/newsgroups

Thanks,
Ayman Shoukry
VC++ Team