Reputation: 823
I have one solution with several projects. Say ProjectA
is the one that will produce the exe file, and ProjectB
simply produces a .lib
file. I have checked that ProjectA
depends on ProjectB
, so that ProjectB
will always compile before ProjectA
.
When I compile ProjectB
everything goes fine. But if I compile ProjectA
I get linking errors saying that some method of B does not exist. I have checked, and it does exist.
¿What is going on?
Thanks for your help!
Upvotes: 1
Views: 516
Reputation: 107357
I found there were several things I needed to check to fix the vexing link error:
"link.exe" exited with code 1104.
Project -> Linker -> General -> Link Library Dependencies : Yes
Project Depdendencies
and ensure Project A
references Project B
ProjectA
ensure that you don't have an additional linker library dependency on ProjectB.lib
. This seems to encourage to look VS to look for another library called ProjectB.lib
, elsewhere.$(SolutionDir)$(Platform)\$(Configuration)\
).Upvotes: 0
Reputation: 91330
Project Properties, Linker, General: Set "Link Library Dependencies" to Yes.
Upvotes: 5