I was trying to compile a c project in visual studio which generated by ECPG file then I got this error
LNK1104 cannot open file 'C:\Program Files\PostgreSQL\14\lib.obj
even though I added this line C:\Program Files\PostgreSQL\14\lib
in Additional Dependencies in addtion to this line C:\Program Files\PostgreSQL\14\include
in Additional Include Directories
I tried to open Additional Dependencies to change
C:\Program Files\PostgreSQL\14\lib
To
"C:\Program Files\PostgreSQL\14\lib"
but still the same error
this is not the correct way to link a library in VScode
go to Project
Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies.
and add the name of the library you want to linkfinally, make sure that you are configuring it in the correct platform (x86 or x64)