openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] Conversion from half to float


From: James Burgess
Subject: Re: [Openexr-devel] Conversion from half to float
Date: Thu, 31 May 2012 10:58:28 -0700

Hi Andreas, 
 That error is a link-time error which is very different from whether or not 
the conversion would work or not (a compile time or run time error). Your 
assignment is correct but the linker is telling you you referred to some data 
you forget to add to the link line. Obviously your code doesn't directly refer 
to something called half::_toFloat, it has been hidden from view by the C++ 
class half. The compiler though, knew all about this and if you dig through the 
headers files you'd find it.

So how do you remedy this? Well you have either just missed a .lib file from 
the link line or you have ended up building openexr incorrectly. 

Lets hopes it's the former, you can list all the symbols a .lib file exports 
with the command line tool dumpbin:

C:\> dumpbin -exports Half.lib

Half.lib is where half::_toFloat should be defined :-)

- James

PS address@hidden@@address@hidden@B is the the compiler's name for the same 
symbol, google c++ name mangling


On May 31, 2012, at 3:02 AM, Zindel, Andreas wrote:

> Hi,
> 
> I'm trying to use the OpenExr library in my application to get the pixel
> data of an exr-file. I built the library based on the instructions with
> Visual Studio 2005. The test program I wrote can access the exr-file and
> get the data of the pixel as half values. Now when I try to convert the
> half values into float (which I need for the next step of the
> processing) like this:
> 
> half a = newPixels[i][j].r;
> float b = a;
> 
> I get the following error message from Visual Studio that says:
> 
> OpenExrReader.obj : error LNK2001: unresolved external symbol "private:
> static union half::uif const * const half::_toFloat"
> (address@hidden@@address@hidden@B)
> 
> The conversion from half to float should work this way accordingly to
> the OpenExr doc.
> 
> Does anyone know how to solve this problem?
> 
> Greetings
> 
> _______________________________________________
> Openexr-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/openexr-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]