How I compiled OpenVDB Version 0.96.0 on Windows 7 using Visual Studio 2010
3,935 views
Skip to first unread message
Joe
unread,
Oct 24, 2012, 12:19:20 PM10/24/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openvd...@googlegroups.com
I thought this might be a useful tutorial since it took me an hour to figure out at first, and might save others time since it was not explicit in the download or forum to date.
This is how I compiled OpenVDB Version 0.96.0 on Windows 7 using Visual Studio 2010:
1) First download / compile for windows the requirements specified in the INSTALL file boost, libz, OpenEXR, TBB, etc..
Compile and run this project and you should generate the image below:
Best of luck.
Tonight I will try out 0.97.0 and let you know if that works out fine.
Dave
unread,
Oct 31, 2012, 12:45:23 PM10/31/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openvd...@googlegroups.com
Thanks Joe,
Are you compiling and linking static libs or using dlls? I am having some issues with static libs using version 0.97.0. Things seem to be geared towards dlls by default.
Dave
Dave
unread,
Oct 31, 2012, 12:53:11 PM10/31/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openvd...@googlegroups.com
Joe,
Sorry. I now see from your post that you are in fact linking to a static lib of OpenVDB. Did you need to change anything in Platform.h or any other headers to get this to work properly? Thanks.
Dave
Joe Kider
unread,
Oct 31, 2012, 1:00:01 PM10/31/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openvd...@googlegroups.com
Static,
no real changes to platform.h, what was your error?
Dave
unread,
Oct 31, 2012, 6:12:57 PM10/31/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openvd...@googlegroups.com
Joe,
The first error is below with similar ones for the other static member variables defined.
error C2491: 'openvdb::v0_97_0::io::Archive::sFormatVersionIndex' : definition of dllimport static data member not allowedC:\Code\hfWorkstationResearch\3rdParty\openvdb\io\Archive.ccLine 52
It looks like if I add the _WIN32 preprocessor to my properties and undef _DLL in Platform.h I can work around this.
ch...@nightmare-vfx.com
unread,
Aug 23, 2013, 7:29:46 PM8/23/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openvd...@googlegroups.com
I know this is a fairly old thread but I was just following it with 1.2.1. Everything compiles without errors but when I try to run the program I get complaints that:
This version of c:\temp\hello.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.
It was set for release/x64. All includes/libraries that have x64 flavors are the ones it is including/linking.
Can anyone thing of anything I could be missing?
Ken Museth
unread,
Aug 24, 2013, 8:42:49 PM8/24/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openvd...@googlegroups.com
I don't think so. Actually the issue I posted about is now gone and I'm running into linking issues. I attribute most of that to the fact I have no idea what I'm doing. :) Will check out the Github version. Thanks.
Ram Sampath
unread,
Sep 27, 2013, 9:06:30 PM9/27/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openvd...@googlegroups.com
Sorry I posted my reply to the author by mistake.
Anyway, here was my experience...
Although this might not be the case in your scenario..., here's one scenario in which linker errors could happen.
The TBB, boost libraries etc bundled with Houdini are compiled with Visual Studio 2008 and might not work if you link hello world in openvdb in Visual Studio 2010 or later.
Alternatively, downloading all the dependent libraries separately and compiling them using VS2010 or later should work...
Hope this helps.
Ram.
haggi
unread,
Oct 1, 2013, 5:44:57 PM10/1/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openvd...@googlegroups.com
I tried to compile VDB and now I have a lib, thanks for the description. But I have some problems with my test program. I get double defined symbols, but I don't know where the problem lies:
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::operator<<(float)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z) already defined in OpenVDB.lib(openvdb.obj) 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __cdecl std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z) already defined in VDBTestNeu.obj 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __int64 __cdecl std::ios_base::width(__int64)" (?width@ios_base@std@@QEAA_J_J@Z) already defined in VDBTestNeu.obj 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: int __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z) already defined in VDBTestNeu.obj 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_streambuf<char,struct std::char_traits<char> > * __cdecl std::basic_ios<char,struct std::char_traits<char> >::rdbuf(void)const " (?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ) already defined in VDBTestNeu.obj 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: char __cdecl std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " (?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ) already defined in VDBTestNeu.obj 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: int __cdecl std::ios_base::flags(void)const " (?flags@ios_base@std@@QEBAHXZ) already defined in VDBTestNeu.obj 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __int64 __cdecl std::ios_base::width(void)const " (?width@ios_base@std@@QEBA_JXZ) already defined in VDBTestNeu.obj 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ) already defined in VDBTestNeu.obj 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > * __cdecl std::basic_ios<char,struct std::char_traits<char> >::tie(void)const " (?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ) already defined in VDBTestNeu.obj 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: bool __cdecl std::ios_base::good(void)const " (?good@ios_base@std@@QEBA_NXZ) already defined in VDBTestNeu.obj 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: void __cdecl std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ) already defined in VDBTestNeu.obj 1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "bool __cdecl std::uncaught_exception(void)" (?uncaught_exception@std@@YA_NXZ) already defined in libcpmtd.lib(uncaught.obj)
I use a static OpenVDB.lib and VS 2010 64bit. Any ideas?