sideeffects / HoudiniFBX

Houdini's FBX integration.
46 stars 16 forks source link

Compile Error. #4

Closed rygo6 closed 4 years ago

rygo6 commented 5 years ago

Hello, I am trying to build on windows 10 with Cygwin. But I am getting this error:

$ make ROP_FBX.dll /bin/sh: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/bin/Hostx64/x64/cl: No such file or directory C:/PROGRA~1/SIDEEF~1/HOUDIN~1.352/toolkit/makefiles/Makefile.gnu:40: *** ==== Unknown version of Visual C++ ====. Stop.

Any help would be appreciated.

dpernuit commented 5 years ago

Hi,

This seems like a path issue, you should try setting MSVCDir with the short path to the VC dir:

export MSVCDir=C:/PROGRA~2/MICROS~1.0/VC

(you may wanna double check what the short path for that directory on your machine is)

dpernuit commented 5 years ago

If after setting that you encounter a link error (missing msvcprt.lib), try modifying Makefile.win in "Houdini17.0.xxx\toolkit\makefiles"

Make sure the SYSLIBINC line contains the following: -LIBPATH:"$(MSVCDir)/lib$(AMD64_SUFFIX)"

(replace LIB_ARCH_SUFFIX by AMD64_SUFFIX)

I ended up with:

SYSLIBINC = -LIBPATH:"$(MSVCDir)/lib$(AMD64_SUFFIX)" -LIBPATH:"$(WIN32_KIT)/Lib/$(WIN32_KIT_VERSION)/ucrt$(LIB_ARCH_SUFFIX)" -LIBPATH:"$(WIN32_KIT)/Lib/$(WIN32_KIT_VERSION)/um$(LIB_ARCH_SUFFIX)"

dpernuit commented 5 years ago

If you're using H17.0 / Visual 2017, then my previous answer was incorrect. To get the proper folder for H17, you want to call hcustom.exe --output_msvcdir and use the value its returning for MSVCDir

(In my case that was "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428" but yours might differ)

rygo6 commented 5 years ago

The short path seemed to get me somewhere. But I can't specify ROP_FBX.dll?

rygo6@ryan-itx-w10 /cygdrive/c/Users/rygo6/Developer/HoudiniFBX/src/ROP
$ export MSVCDir=C:/PROGRA~2/MICROS~1.0/VC

rygo6@ryan-itx-w10 /cygdrive/c/Users/rygo6/Developer/HoudiniFBX/src/ROP
$ make ROP_FBX.dll
make: *** No rule to make target 'ROP_FBX.dll'.  Stop.

rygo6@ryan-itx-w10 /cygdrive/c/Users/rygo6/Developer/HoudiniFBX/src/ROP
$ make
"C:/PROGRA~2/MICROS~1.0/VC/bin/amd64/cl" -c -nologo -TP -Zc:forScope -Zc:rvalueCast -Zc:inline -Zc:strictStrings -std:c++14 -Zc:referenceBinding -Zc:ternary -Zc:throwingNew -permissive- -DAMD64 -DSIZEOF_VOID_P=8 -DI386 -DWIN32 -DSWAP_BITFIELDS -D_WIN32_WINNT=0x0502 -DNOMINMAX -DSTRICT -DWIN32_LEAN_AND_MEAN -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -DSESI_LITTLE_ENDIAN -DHBOOST_ALL_NO_LIB -DEIGEN_MALLOC_ALREADY_ALIGNED=0 -DFBX_ENABLED=1 -DOPENCL_ENABLED=1 -DOPENVDB_ENABLED=1 -I . -IC:/PROGRA~1/SIDEEF~1/HOUDIN~1.352/toolkit/include -IC:/PROGRA~1/SIDEEF~1/HOUDIN~1.352/toolkit/include/fbx -I "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.352/toolkit/include" -I "C:/PROGRA~2/MICROS~1.0/VC/include" -I "C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/ucrt" -I "C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/um" -I "C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/shared" -wd4355 -w14996 -O2 -DNDEBUG -MD -EHsc -GR -bigobj  -DMAKING_DSO -DUT_DSO_TAGINFO='"3262197cbf7250132cf02d9a5e3b9fb1225acdbdd87389e46da8c3327445ec9c329220849f7d272e4332f8ed6bda5f531deee730e3c2eb54420e3de16df897b64aac45d092b84994a3268d0847ba11bef254d5a296e59632d3a444191947a858e313f211cf58"' \
    ROP_FBX.C -FoROP_FBX.o
cl : Command line warning D9002 : ignoring unknown option '-Zc:ternary'
cl : Command line warning D9002 : ignoring unknown option '-permissive-'
ROP_FBX.C
C:/PROGRA~2/MICROS~1.0/VC/include\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory
C:/PROGRA~1/SIDEEF~1/HOUDIN~1.352/toolkit/makefiles/Makefile.gnu:71: recipe for target 'ROP_FBX.o' failed
make: *** [ROP_FBX.o] Error 2
a1ex3d commented 4 years ago

Same problem and everything I do leads to: $ make ROP_FBX.dll ==== Building for Houdini 17.5.425 ==== make: *** No rule to make target 'ROP_FBX.dll'. Stop.

e4lam commented 4 years ago

@a1ex3d Try make WINDOWS=1 ROP_FBX.dll ?

a1ex3d commented 4 years ago
  1. I need to change Makefile.gnu AMD64_SUFFIX := /Hostx64/x64 to AMD64_SUFFIX := /amd64 because there is no folder Hostx64 in Microsoft Visual Studio 14.0
  2. $ make WINDOWS=1 ROP_FBX.dll ==== Building for Houdini 17.5.425 ==== "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/bin/amd64/link" -DLL ROP_FBX.o ROP_FBXExporter.o ROP_FBXExporterWrapper.o ROP_FBXActionManager.o ROP_FBXAnimVisitor.o ROP_FBXBaseAction.o ROP_FBXBaseVisitor.o ROP_FBXCommon.o ROP_FBXDerivedActions.o ROP_FBXErrorManager.o ROP_FBXMainVisitor.o ROP_FBXUtil.o -LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/lib/x64" -LIBPATH:"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.17763.0/ucrt/x64" -LIBPATH:"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.17763.0/um/x64" -LIBPATH:"E:/PROGRA~1/SIDEEF~1/HOUDIN~1.425/custom/houdini/dsolib" "E:/PROGRA~1/SIDEEF~1/HOUDIN~1.425/custom/houdini/dsolib/.a" "E:/PROGRA~1/SIDEEF~1/HOUDIN~1.425/custom/houdini/dsolib/.lib" \ -out:ROP_FBX.dll Microsoft (R) Incremental Linker Version 14.00.24210.0 Copyright (C) Microsoft Corporation. All rights reserved.

LINK : fatal error LNK1104: cannot open file 'msvcprt.lib' make: *** [E:/PROGRA~1/SIDEEF~1/HOUDIN~1.425/toolkit/makefiles/Makefile.gnu:81: ROP_FBX.dll] Error 80

and I found that I haven`t forder C:/Program Files (x86)/Windows Kits/10/Lib/10.0.17763.0/ I have 10.0.18362.0 and I copy it and rename to 10.0.17763.0

after this I have long list of compiling (start working) but at the end

5c192b84994a3268d0847ba11bef254d582aaccbd41c1890d4937388462df7bd77fcf6383"' \ ROP_FBXUtil.C -FoROP_FBXUtil.o cl : Command line warning D9002 : ignoring unknown option '-Zc:ternary' cl : Command line warning D9002 : ignoring unknown option '-permissive-' ROP_FBXUtil.C "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/bin/amd64/link" -DLL ROP_FBX.o ROP_FBXExporter.o ROP_FBXExporterWrapper.o ROP_FBXActionManager.o ROP_FBXAnimVisitor.o ROP_FBXBaseAction.o ROP_FBXBaseVisitor.o ROP_FBXCommon.o ROP_FBXDerivedActions.o ROP_FBXErrorManager.o ROP_FBXMainVisitor.o ROP_FBXUtil.o -LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/lib/x64" -LIBPATH:"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.17763.0/ucrt/x64" -LIBPATH:"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.17763.0/um/x64" -LIBPATH:"C:/HOUDIN~1.425/custom/houdini/dsolib" "C:/HOUDIN~1.425/custom/houdini/dsolib/.a" "C:/HOUDIN~1.425/custom/houdini/dsolib/.lib" \ -out:ROP_FBX.dll Microsoft (R) Incremental Linker Version 14.00.24210.0 Copyright (C) Microsoft Corporation. All rights reserved.

LINK : fatal error LNK1104: cannot open file 'msvcprt.lib' make: *** [C:/HOUDIN~1.425/toolkit/makefiles/Makefile.gnu:81: ROP_FBX.dll] Error 80

e4lam commented 4 years ago

@a1ex3d

  1. I need to change Makefile.gnu AMD64_SUFFIX := /Hostx64/x64 to AMD64_SUFFIX := /amd64 because there is no folder Hostx64 in Microsoft Visual Studio 14.0

Well, there's a big problem right there. The HDK documentation for Houdini 17.5 says that it requires Microsoft Visual C++ 2017 (and I would use latest version of that). The makefiles are set up for using VS 2017 which has a different directory layout than VS 2015. I forget now but even if you did manage to build it with VS 2015, Houdini still might refuse to load it if it's not compiled with VS 2017.

a1ex3d commented 4 years ago

Thanks for answering! Ok, I`ll try to compile with VS 2017 or 2019

e4lam commented 4 years ago

Houdini 17.5 will for sure reject any plugins built with VS 2019. Please use the latest update of VS 2017.

a1ex3d commented 4 years ago

I deleted VS 2019 and installed VS 2017. I compiled the project again and got some errors in finding the libraries. They are in C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0* and I don't know how to tell the compiler the path to these folders, so I just copied their contents to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include and finally I got this error

$ make WINDOWS=1 ROP_FBX.dll ==== Building for Houdini 17.5.425 ===

LINK : warning LNK4044: unrecognized option '/undefined'; ignored LINK : fatal error LNK1181: cannot open input file 'dynamic_lookup.obj' make: *** [C:/Houdini17.5.425/toolkit/makefiles/Makefile.gnu:81: ROP_FBX.dll] Error 157

e4lam commented 4 years ago

Did you update your VS 2017 installation to its latest update? In my $HFS/toolkit/makefiles/Makefile.win I see WIN32_KIT_VERSION = 10.0.17763.0. Your 14393 version is definitely old. Regardless, you can just modify that file (or make a copy of it into your local build) to point at an SDK version that matches.

As for the LNK4044: unrecognized option '/undefined', I don't know why you would get that. I see it commented out: https://github.com/sideeffects/HoudiniFBX/blob/72ecd73c22e365e21d07052eccfe197eabd3cf12/src/ROP/Makefile#L39

a1ex3d commented 4 years ago

Haaa!!!!!! Thanks! I update VS 2017 and point MSVCDir to 14.16.27024. Then I comment #LDFLAGS = -undefined dynamic_lookup (because for ver of Houdini 17.5 I think there is no comment) AND I GOT DLL ))) Thanks to big help and you time!

e4lam commented 4 years ago

I think that if you want to experiment with making changes though (ie. the point of compiling this yourself instead of using the factory shipped one), then you should probably work with the latest code in the Houdini 17.5 branch.'

I'm closing this issue since there seems to be no real issue with building.