title: Link Error in Unreal Engine
body: <p><em>Disclaimer: there is a high chance this is very specific to Unreal Engine, but I haven't got an answer there so I thought I'd try a more general query here. Sorry if this is considered off topic/too specific</em></p>
  
  <p>I am getting a link error compiling the following code in Unreal Engine 4:</p>
  
  <pre><code>RHISetRenderTarget(TextureRenderTarget-&gt;GetRenderTargetTexture(), NULL);
  </code></pre>
  
  <p>This is being called within a macro (<code>ENQUEUE_UNIQUE_RENDER_COMMAND_TWOPARAMETER</code>) but the link error happens even if you don't. </p>
  
  <p>The error itself is:</p>
  
  <pre><code>MaterialToTextureRenderer.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl RHISetRenderTargets(unsigned int,class FRHIRenderTargetView const *,class FRHITexture *,unsigned int,class FRHIUnorderedAccessView * const *)" (__imp_?RHISetRenderTargets@@YAXIPEBVFRHIRenderTargetView@@PEAVFRHITexture@@IPEBQEAVFRHIUnorderedAccessView@@@Z) referenced in function "void __cdecl RHISetRenderTarget(class FRHITexture *,class FRHITexture *)" (?RHISetRenderTarget@@YAXPEAVFRHITexture@@0@Z)
  </code></pre>
  
  <p><em>Compressed for readability:</em></p>
  
  <pre><code>unresolved external symbol: void RHISetRenderTargets(unsigned int, FRHIRenderTargetView const *,FRHITexture *,unsigned int,FRHIUnorderedAccessView * const *)
  referenced in: void RHISetRenderTarget(FRHITexture *,FRHITexture *)
  </code></pre>
  
  <p>(The method the unlinked method is referenced in is the method I am calling). </p>
  
  <p>And 4 other simillar link errors.</p>
  
  <p>I'm not by any stretch of the imagination a C++ expert, but my understanding is a link error is caused when the header file is correctly included but then it can't actual find an implementation of the method to point to. </p>
  
  <p>What I don't understand is, the method whose implementation it can't find, is within the Unreal Engine (which I am assuming doesn't actually have missing method implementations etc!).</p>
  
  <p>Further, both the method I am calling, and the method it is calling (and can't link) are both defined <code>inline</code> in the same header file. The only thing I can see that could be wrong is the method that is being used is declared and implemented further down the header file, but I don't believe that could be a problem (certainly not a link problem). </p>