Unable to compile sample SOP with hcustom

   7005   10   2
User Avatar
Member
9 posts
Joined: Aug. 2014
Offline
I'm using Houdini 16.0.504.10 on Windows 7 with Visual Studio Professional 2015. I'm trying to compile the sample SOP with hcustom as described in the HDK introductory docs [sidefx.com]. Every time, I'm getting the error “The MSVCDir environment variable is set, but does not point to a valid directory. Please set it correctly and try again.”

I copied toolkit\samples to C:\samples. I get the error when I open a command prompt from C:\samples\SOP and run:

set MSVCDir=C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC
"C:\Program Files\Side Effects Software\Houdini 16.0.504.10\bin\hcustom.exe" SOP_Star.C

I confirmed that the VC directory path is correct and does exist on my HD. I've tried several variations on the MSVCDir value, including backward slashes, a trailing slash, and shortened directory names.

set MSVCDir=C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC
set MSVCDir=C:/PROGRA~2/MI0E91~1.0/VC
set MSVCDir=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
set MSVCDir=C:\PROGRA~2\MI0E91~1.0\VC

Any idea what I'm missing?
Edited by Pyraxis - March 30, 2017 15:45:41
User Avatar
Member
9 posts
Joined: July 2014
Offline
hi can you try
MSVCDir=C:/PROGRA~2/MICROS~2.0/VC
Edited by Sergen Eren - April 5, 2017 07:51:07
https://sergeneren.com/ [sergeneren.com]
User Avatar
Member
12 posts
Joined: Jan. 2017
Offline
Hey, did you guys find a solution to this? I'm getting the same thing. I've tried the above.
User Avatar
Member
173 posts
Joined: April 2014
Offline
I don't know how to solve your issue, but sidefx ships visual studio solution as well as a cmake file, which you could probably use to build your SOP (it's in HFS/toolkit).
User Avatar
Member
197 posts
Joined: Jan. 2013
Online
On Windows, you need Visual Studio to compile the plugins (download from Microsoft). It is absolutely important that you compile your HDK code using the same compiler version that built Houdini. One can determine by looking at the suffix of the installer file. Here is a quick list of the available Houdini Windows versions and which compiler is used to build each one:

Suffix Compiler
vc14 Microsoft Visual C++ 2015

Most likely you are using the wrong version of Visual Studio.
User Avatar
Member
12 posts
Joined: Jan. 2017
Offline
Thanks, I managed to get it working, but then I found out I could just make my plugin using pyside2 with QT and didn't need to compile anything anyway!
User Avatar
Member
1743 posts
Joined: March 2012
Offline
The CMake HDK example is a work in progress. We're still trying to get everything set up correctly in it, though we're getting close. The Visual Studio project in HFS/toolkit is just a temporary thing until the CMake setup is working properly, and the Visual Studio project may not work properly either; it will probably be removed once CMake works.

In the mean time, hcustom and the Makefile approach are currently still the only recommended approaches to build HDK plugins.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
3 posts
Joined: Jan. 2016
Offline
Same Dummy problem here:
try hard to understand witch mvs have to use,
atm win 8, Houdini 18.0.348 Apprentice

set MSVCDir=“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314”
C:\Program Files\Side Effects Software\Houdini 18.0.348\bin\hcustom.exe" geo2voxel.C


receiving the error: MSVCDir incorrect environment variable - check iostream exist (and it does)

Update:
I had a misspelling, now is working
Edited by cily - Feb. 24, 2020 12:34:18
User Avatar
Member
3 posts
Joined: Jan. 2016
Offline
Houdini doesn't like the dll, can't catch any error but it's not loading it,
I suppose visual studio 2019 is not matching with Houdini 18,
http://www.sidefx.com/docs/hdk/_h_d_k__intro__getting_started.html [www.sidefx.com]
this table is not really clear to me, I'm downloading visual 2017 and see if its gonna work
User Avatar
Member
25 posts
Joined: May 2014
Offline
check out my blog for your first HDK project

HOUDINI HDK [aminkhormaei1.wixsite.com]

Click on HOUDINI HDK
Edited by amin khormaei - Feb. 28, 2020 09:22:55
User Avatar
Member
1 posts
Joined: Oct. 2013
Offline
cily
Houdini doesn't like the dll, can't catch any error but it's not loading it,
I suppose visual studio 2019 is not matching with Houdini 18,
http://www.sidefx.com/docs/hdk/_h_d_k__intro__getting_started.html [www.sidefx.com]
this table is not really clear to me, I'm downloading visual 2017 and see if its gonna work

I had a similar issue to yours but managed to get hcustom to compile. I'm using Windows 10, Houdini 18.0.391.

- downloaded Visual Studio Build Tools 2017 v15.9 (because my Houdini installation file houdini-18.0.391-win64-vc141.exe contains “vc141” and the HDK docs that you pointed out says that it should be Microsoft Visual C++ 2017, version 15.8.5)
- set system variable MSVCDir to C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023
- ran hcustom in Houdini's Command Line Tools (so that the shell has Houdini environment loaded)

inlinecpp in Python also works since hcustom works with the set up above.
  • Quick Links