Esri / cityengine-sdk

CityEngine is a 3D city modeling software for urban design, visual effects, and VR/AR production. With its C++ SDK you can create plugins and standalone apps capable to execute CityEngine CGA procedural modeling rules.
https://esri.github.io/cityengine/cityenginesdk
Apache License 2.0
206 stars 64 forks source link

`prt4cmd.exe` fails to load `com.esri.prt.unreal.dll` #51

Closed OlivierSohn closed 2 years ago

OlivierSohn commented 2 years ago

Hello,

While following the README_windows, for the command:

C:\cityengine-sdk\examples\prt4cmd\install>bin\prt4cmd.exe -l 3 -g ..\..\..\data\candler_footprint.obj -p ..\..\..\data\candler.rpk -a ruleFile:string=bin/candler.cgb -a startRule:string=Default$Footprint -e com.esri.prt.codecs.OBJEncoder -z baseName:string=theCandler

the following error occured :

[2022-11-10 13:51:11] [error] failed to load library: error while loading library 'C:\cityengine-sdk\examples\prt4cmd\install\lib\com.esri.prt.unreal.dll': The specified module could not be found.
[2022-11-10 13:51:11] [warning] Failed to load library 'C:\cityengine-sdk\examples\prt4cmd\install\lib\com.esri.prt.unreal.dll' as extension for PRT core at 'C:\cityengine-sdk\examples\prt4cmd\install\bin\com.esri.prt.core.dll'
[2022-11-10 13:51:11] [warning] CGB file contains warning 'Potentially problematic CGAC version 1.6 : recompiling with current CGA Compiler (1.19) is recommended.'

Removing com.esri.prt.unreal.dll in examples\prt4cmd\install\libfixed the error. Note that I don't have Unreal Engine installed on my machine.

Thanks, Olivier

mistafunk commented 2 years ago

Thanks for the feedback. We recognize that this error message is somewhat misleading. If you do not need the Unreal encoder for your task then this error can be ignored, prt4cmd will still work correctly. Or you might want to install the Epic launcher which will install the necessary runtime dependencies for our Unreal encoder dll.

OlivierSohn commented 2 years ago

this error can be ignored, prt4cmd will still work correctly

Unfortunately it prevents prt4cmd from working correctly, this is why the dll must be removed in my case. This is somewhat hard to figure out for new users.

mistafunk commented 2 years ago

Ok, that is unexpected. We will look into it asap.

OlivierSohn commented 2 years ago

Thank you!

mistafunk commented 2 years ago

Actually, one more question: you are seeing that when the unreal encoder cannot be loaded, you will not get the expected OBJ file in the output folder, correct?

OlivierSohn commented 2 years ago

My bad, actually the tool produces results in case the dll failed to load.

OlivierSohn commented 2 years ago

Maybe this error message should be made a warning instead?

OlivierSohn commented 2 years ago

Also the "output" directory is actually inside the install directory, not next to the install directory contrary to what the doc says:

The result is placed in a new output directory next to the install directory

This adds to the confusion because when looking for this folder at the location the doc specifies, nothing is there.

Maybe a success message in the tool saying where the results have been written would be useful.

mistafunk commented 2 years ago

Maybe this error message should be made a warning instead?

Agreed - the error on the first line is actually the underlying issue, while the second line with the warning is the main message to the user. We'll try to demote the error to a warning as well (or merge the two).

OlivierSohn commented 2 years ago

Ah ok, makes sense.