I've been trying to compile OpenVDB on window, but I have a type of error that I have not encountered before
Here is the command (generated by cmake and make) which causes an error:
C:\mingw\bin\g++.exe -shared -o libopenvdb.dll -Wl,--out-implib,libopenvdb.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,--whole-archive CMakeFiles\openvdb.dir/objects.a -Wl,--no-whole-archive -LC:\mingw\install C:\mingw\install\lib\Half.lib C:\mingw\install\lib\libzlib.dll -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
CMakeFiles\openvdb.dir/objects.a(Grid.cc.obj):Grid.cc:(.text$_ZN4halfC2Ef[__ZN4halfC2Ef]+0x70): undefined reference to `half::_eLut'
CMakeFiles\openvdb.dir/objects.a(Grid.cc.obj):Grid.cc:(.text$_ZN4halfC2Ef[__ZN4halfC2Ef]+0xb5): undefined reference to `half::convert(int)'
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.3/../../../../i686-w64-mingw32/bin/ld.exe: CMakeFiles\openvdb.dir/objects.a(Grid.cc.obj): bad reloc address 0xb5 in section `.text$_ZN4halfC2Ef[__ZN4halfC2Ef]'
Undefined reference but Half.lib is being linked.
I ran dumpbin on the lib file to check if the missing items were present and they are indeed there: http://pastebin.com/6JjhGyky
I tried looking at the other stack overflow posts and googled issues with similar description but they do not seem sufficiently relevant to my problem to be of help.
I'm not sure if I've seen the "bad realoc address" error before, which may be the key to my problem, but googling has provided me little understanding of what exactly it means.
Any suggestions to where my problem might lie is appreciated!
half::convert(int)
, it looks like the symbol isprivate
, notpublic
:Symbol name : ?convert@half@@CAFH@Z (private: static short __cdecl half::convert(int))
. – jww