Re: Link Error when using "half"

Gonzalo Garramuno <[email protected]> Wed, 25 Feb 2015 11:41:47 -0300
Newsgroups gmane.comp.video.openexr.devel
Message-ID <[email protected]>
On 25/02/15 07:10, Delio Vicini wrote:
>  Hi,
> The exact linker error message is:
>
> 1>main.obj : error LNK2001: unresolved external symbol "private: 
> static union half::uif const * const half::_toFloat" 
> (?_toFloat@half@@0QBTuif@1@B)
> 1>..\..\bin\Release\x64\OpenEXRExample.exe : fatal error LNK1120: 1 
> unresolved externals
>
> Cheers,
> Delio
You need to add a define when compiling to a DLL.   Set:

-D OPENEXR_DLL

in your defines when you compile with CL.exe.