UrhoSharp.Forms on UWP - unable to load dll 'mono-urho'

MarcusSonestedtMarcusSonestedt USMember
edited October 2016 in UrhoSharp

I'm trying to use Xamarin.Forms to embed a Urho-application with some generic UI, defined in a portable project.

It's working on Android, so that's nice!

The Xamarin UrhoSharp Feature samples work for UWP, but the UI isn't cross-platform there, so I'd like to avoid that if possible.

On UWP x86/32-bit, which seems to be the only supported config (?), I get this exception:

"Unable to load DLL 'mono-urho': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

   at Urho.Sdl.SDL_SetMainReady()
   at Urho.UWP.UrhoSurface.Run(Type appType, String[] customAssetsPaks, ApplicationOptions opt)
   at Urho.Forms.UwpSurfaceRenderer.UrhoLauncher(Type type, ApplicationOptions opts)
   at Urho.Forms.UrhoSurface.<Show>d__4`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at XamarinTest.SessionPage.<OnAppearing>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()

The mono-urho.dll is found in /bin/x86/debug (copied from packages...)

My references for the UWP project:

  • Microsoft.NETCore.UniversalWindowsPlatform 5.2.2
  • Oxage.Xam.VideoPlayer 1.2.0
  • Universal Windows
  • UrhoSharp.Forms 1.1.125
  • Xamarin.Forms 2.3.2.127
  • XamarinTest (my portable lib)

I looked at the DLL with the dependency walker, but I suspect it that's not really useful for UWP. It found the DirectX DLL but not the UWP-runtime, probably due to paths not being the same.

Any ideas?

Best Answer

Answers

  • AdamPAdamP AUUniversity ✭✭✭✭✭

    @MarcusSonestedt - exact same issue here.

  • EgorBoEgorBo BYXamarin Team ✭✭✭

    @AdamP
    I've just checked in master and it works for me, do you have any repro projects?
    PS: UWP supports only x86 at the moment.

  • AdamPAdamP AUUniversity ✭✭✭✭✭

    @AdamP - I certainly do :) https://github.com/adamped/UrhoSharp.Demo

    I am trying with x86 on my Visual Studio Emulator.

  • EgorBoEgorBo BYXamarin Team ✭✭✭

    @AdamP
    Windows Phone is not supported even in x86 emulator unfortunately.
    I tried your repro on Windows 10 local machine and it worked (but I had to add a ctor(ApplicationOptions options) to HelloWorld application - this will be fixed with the next release).

  • AdamPAdamP AUUniversity ✭✭✭✭✭

    thanks @EgorBo. I was aware of the x86 requirements but didn't realize it wasn't avail on phone.

    I tried it locally after adding these constructors to my Application.

        public HelloWorld() { }
        public HelloWorld(ApplicationOptions options) : base(options) { }
    

    It now loads and I can see Hello World.

    However, I tried it on my 3D spinning pyramid and all it shows is a black screen. (UWP x86 Desktop) https://github.com/adamped/UrhoSharp.Demo3D

  • utekaiutekai USMember ✭✭

    I'm getting this too, but a bit different as focused on hololens. http://screencast.com/t/bza2l5UeuM

    Previous to this, the entire Source/Source folder was missing from the repo, but I found it in the binaries (except for some of the files as shown).

    Severity Code Description Project File Suppression State
    Error Payload file 'C:\urho\Bin\HoloLens\mono-holourho.dll' does not exist. Playgrounds.HoloLens
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory (compiling source file ......\Bindings\Portable\Generated\events.cpp) UrhoSharp.HoloLens c:\urho\bindings\native\allurho.h
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory (compiling source file ......\Bindings\Portable\Generated\binding.cpp) UrhoSharp.HoloLens c:\urho\bindings\native\allurho.h
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory (compiling source file ......\Bindings\Native\ApplicationProxy.cpp) UrhoSharp.HoloLens c:\urho\bindings\native\allurho.h
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory (compiling source file ......\Bindings\Native\vector.cpp) UrhoSharp.HoloLens c:\urho\bindings\native\allurho.h
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory (compiling source file ......\Bindings\Native\glue.cpp) UrhoSharp.HoloLens c:\urho\bindings\native\allurho.h
    Error C1083 Cannot open source file: '....\Source\Source\ThirdParty\SDL\src\power\winrt\SDL_syspower.cpp': No such file or directory UrhoSharp.HoloLens C:\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\c1xx
    Error C1083 Cannot open source file: '....\Source\Source\ThirdParty\SDL\src\thread\stdcpp\SDL_syscond.cpp': No such file or directory UrhoSharp.HoloLens C:\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\c1xx
    Error C1083 Cannot open source file: '....\Source\Source\ThirdParty\SDL\src\thread\stdcpp\SDL_sysmutex.cpp': No such file or directory UrhoSharp.HoloLens C:\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\c1xx
    Error C1083 Cannot open source file: '....\Source\Source\ThirdParty\SDL\src\thread\stdcpp\SDL_systhread.cpp': No such file or directory UrhoSharp.HoloLens C:\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\c1xx

  • EgorBoEgorBo BYXamarin Team ✭✭✭

    @utekai are you trying to compile bindings yourself instead of using nuget?
    It looks like you didn't check out the Urho3D submodule
    run the following command in the root directory:
    git submodule update --init

  • utekaiutekai USMember ✭✭
    edited November 2016

    C:\urho>git submodule update --init
    Submodule 'Samples' (git@github.com:xamarin/urho-samples.git) registered for path 'Samples'
    Submodule 'Urho3D/Source' (git@github.com:xamarin/Urho3D.git) registered for path 'Urho3D/Source'
    Cloning into 'Samples'...
    Permission denied (publickey).
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.
    fatal: clone of 'git@github.com:xamarin/urho-samples.git' into submodule path 'Samples' failed

    C:\urho>git submodule
    -f34c0b731a57bd43c7006b41dcd6e66b6e034bd1 Samples
    -7a27e0068175b2a4a9f158f8359ed2e0775bcc61 Urho3D/Source

    C:\urho>

  • utekaiutekai USMember ✭✭
    edited November 2016

    Ok, got past that, had to 1) modify git config to use 'https:/' instead of 'git@', and 2) added the correct url for samples in the same file. After that the command 'git submodule update --init' ran to completion.

    This helped http://stackoverflow.com/questions/8197089/fatal-error-when-updating-submodule-using-git

    But still a problem: http://screencast.com/t/31CgOlfq

    After these changes, the build output for UrhoSharp.Hololens provides:
    Severity Code Description Project File Suppression State
    Error C1083 Cannot open source file: '....\Source\Source\ThirdParty\SDL\src\power\winrt\SDL_syspower.cpp': No such file or directory UrhoSharp.HoloLens C:\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\c1xx
    Error C1083 Cannot open source file: '....\Source\Source\ThirdParty\SDL\src\thread\stdcpp\SDL_syscond.cpp': No such file or directory UrhoSharp.HoloLens C:\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\c1xx
    Error C1083 Cannot open source file: '....\Source\Source\ThirdParty\SDL\src\thread\stdcpp\SDL_sysmutex.cpp': No such file or directory UrhoSharp.HoloLens C:\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\c1xx
    Error C1083 Cannot open source file: '....\Source\Source\ThirdParty\SDL\src\thread\stdcpp\SDL_systhread.cpp': No such file or directory UrhoSharp.HoloLens C:\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\c1xx
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory (compiling source file ......\Bindings\Portable\Generated\binding.cpp) UrhoSharp.HoloLens c:\urho\bindings\native\allurho.h
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory (compiling source file ......\Bindings\Portable\Generated\events.cpp) UrhoSharp.HoloLens c:\urho\bindings\native\allurho.h
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory (compiling source file ......\Bindings\Native\ApplicationProxy.cpp) UrhoSharp.HoloLens c:\urho\bindings\native\allurho.h
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory (compiling source file ......\Bindings\Native\vector.cpp) UrhoSharp.HoloLens c:\urho\bindings\native\allurho.h
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory (compiling source file ......\Bindings\Native\glue.cpp) UrhoSharp.HoloLens c:\urho\bindings\native\allurho.h

  • EgorBoEgorBo BYXamarin Team ✭✭✭

    @utekai the algorithm is:
    1) make sure all submodules exist
    2) execute "make HoloLens" (see Makefile)
    3) open the solution and build UrhoSharp.HoloLens (Release, x86 configuration)
    I'll update the readme.

  • utekaiutekai USMember ✭✭
    edited November 2016

    C:\urho>make hololens
    which: no brew in (/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Microsoft/TestWindow:... more paths
    ...
    make: *** No rule to make target 'hololens'. Stop.

    C:\urho>

    Same result when running 'make MakeHololens'

  • utekaiutekai USMember ✭✭

    Got into the individual make files and started running commands individually to see what's working and what's not, and it all comes to a halt with this error that occurs when running various cmake commands:

    CMake Error: The source directory "C:/urho/Urho3D/Source" does not appear to contain CMakeLists.txt.

    From ...

    c:\urho>make -j1 libUrho3D.a -f MakeWindows TARGET="Visual Studio 14 Win64" RENDERER=OPENGL
    rm -rf Urho3D/Urho3D_Windows/CMakeFiles && rm -rf Urho3D/Urho3D_Windows/CMakeCache.txt && cd Urho3D/Source && cmake -E make_directory ../Urho3D_Windows && cmake -E chdir ../Urho3D_Windows cmake -G "Visual Studio 14 Win64" ../Urho3D_Windows -DURHO3D_OPENGL=1 -DURHO3D_PCH=0 -DURHO3D_LUA=0 -DURHO3D_ANGELSCRIPT=0 -VS=14 ../../Urho3D/Source/
    CMake Error: The source directory "C:/urho/Urho3D/Source" does not appear to contain CMakeLists.txt.
    Specify --help for usage, or press the help button on the CMake GUI.
    make: *** [MakeWindows:14: Urho3D_Windows] Error 1

    c:\urho>


    The 'brew' issue looks to be an if/else that is faulty when running on windows. I just commented out the entire if/else to move farther. This was in the Makefile file.

    Also, I get a generator of 'Visual Studio 14 2015' rather than 'Visual Studio 14'. So I'm thinking those makefiles are old or not updated and generally not working. At least on windows.

  • utekaiutekai USMember ✭✭

    Also found this, but haven't verified if it fixes my issue yet ... http://stackoverflow.com/questions/39894134/urhosharp-forms-on-uwp-unable-to-load-dll-mono-urho

  • EgorBoEgorBo BYXamarin Team ✭✭✭

    @utekai said:
    C:\urho>make hololens
    which: no brew in (/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Microsoft/TestWindow:... more paths
    ...
    make: *** No rule to make target 'hololens'. Stop.

    C:\urho>

    Same result when running 'make MakeHololens'

    it's case sensitive - "make HoloLens"

  • utekaiutekai USMember ✭✭

    There is no file named 'HoloLens' but there is a file named 'MakeHololens'.

    Running the command 'make HoloLens' returns "which: no brew in ... (paths listed)" and ends with "make: 'HoloLens' is up to date."

    Running the command 'make MakeHololens' fails as previously noted, with statements such as "which: no brew in ... (paths listed)" and at the end 'make: Nothing to be done for 'MakeHololens'

    I'm running this on a windows 10 machine.type

  • utekaiutekai USMember ✭✭

    There are two github repos.

    1. The Urho repo, which has a lot of cmake files included https://github.com/urho3d/Urho3D
    2. The urhosharp repo, which has a lot of make files included https://github.com/xamarin/urho

    Somehow I think these two repos need merged together in order to get a build working for the hololens binding.

    Are there instructions on how to make in order to build for hololens on a machine that hasn't built it?

  • EgorBoEgorBo BYXamarin Team ✭✭✭

    @utekai
    The correct command is - 'make HoloLens'
    GNU make should be installed (for example, cygwin).
    both repositories you mentioned are already linked - Urho3D (via xamarin/Urho3D fork) is added to urhosharp as a git submodule. Make sure you've check it out.

  • utekaiutekai USMember ✭✭
    edited November 2016

    Ok, made some progress.

    1. Uninstalled cygwin and mingw and msys and cmake. Then reinstalled cmake and gnuwin's make.
    2. setup a new ssh key for git/github
    3. successfully downloaded the full urhosharp repository (named urho) with samples and source (apparently was getting a silent error of some sort)
    4. Ran 'make HoloLens' ... which now is running to completion
    5. Opened with VS and compiled.

    This is much farther than I've got before, but still getting an error, for instance when compiling getting errors about can't find files in urho3d, header files for instance. So continued on ...

    1. Downloaded the urho3d repo (c++, named urho3d), ran the cmake batch file for vs2015 into an internal urho3d folder, then compiled successfully.
    2. Copied all the files from this new urho3d/source/urho3d, into the previous repo's urho3d folder..

    At this poin tthe native>Urhosharp.Hololens project compiled successfully.

    However, as an example, the UWP and windows native projects still complain about missing header files, such as:

    Severity Code Description Project File Line Suppression State
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory UrhoSharp.Windows

    To get this going had to work from different machines, making bits of progress on each.

    While I do have the hololens pieces now compiling, the UWP project is important to me and it's not compiling.

    On the original machine, still getting an error that mono-urho.dll can't be found. Followed similar steps on each machine, but they're acting differently.

  • EgorBoEgorBo BYXamarin Team ✭✭✭
    edited November 2016

    Again: it looks like you didn't check out the submodule
    you don't need to download urho3d repo or copy any files
    as I said, the algorithm is:
    git clone git@github.com:xamarin/urho.git
    git submodule update --init
    // make sure Urho3D/Source folder is not empty
    run 'make HoloLens'

    submodule points to a specific version of urho3D fork.

  • utekaiutekai USMember ✭✭

    The xamarin forum editor won't let me post comments, but will let me post a picture of the comments ...

    http://screencast.com/t/ecndXPlylMAy

    Some additional info. The visual studio output window provides a number of warnings, for instance:

    1>c:{localpath}\urho\bindings\native\vector.cpp(23): warning C4018: '>': signed/unsigned mismatch
    1>c:{localpath}\urho\bindings\portable\generated\binding.cpp(1103): warning C4190: 'Serializable_GetAttribute' has C-linkage specified, but returns UDT 'Urho3D::Variant' which is incompatible with C
    1> c:{localpath}\urho\urho3d\urho3d_hololens\include\urho3d\core\variant.h(201): note: see declaration of 'Urho3D::Variant'
    1>c:{localpath}\urho\bindings\portable\generated\binding.cpp(1110): warning C4190: 'Serializable_GetAttribute1' has C-linkage specified, but returns UDT 'Urho3D::Variant' which is incompatible with C
    1> c:{localpath}\urho\urho3d\urho3d_hololens\include\urho3d\core\variant.h(201): note: see declaration of 'Urho3D::Variant'
    1>c:{localpath}\urho\bindings\portable\generated\binding.cpp(1117): warning C4190: 'Serializable_GetAttributeDefault' has C-linkage specified, but returns UDT 'Urho3D::Variant' which is incompatible with C
    1> c:{localpath}\urho\urho3d\urho3d_hololens\include\urho3d\core\variant.h(201): note: see declaration of 'Urho3D::Variant'
    1>c:{localpath}\urho\bindings\portable\generated\binding.cpp(1124): warning C4190: 'Serializable_GetAttributeDefault2' has C-linkage specified, but returns UDT 'Urho3D::Variant' which is incompatible with C
    1> c:{localpath}\urho\urho3d\urho3d_hololens\include\urho3d\core\variant.h(201): note: see declaration of 'Urho3D::Variant'
    1>c:{localpath}\urho\bindings\portable\generated\binding.cpp(1397): warning C4190: 'Animatable_GetObjectAnimationAttr' has C-linkage specified, but returns UDT 'Urho3D::ResourceRef' which is incompatible with C
    1> c:{localpath}\urho\urho3d\urho3d_hololens\include\urho3d\core\variant.h(114): note: see declaration of 'Urho3D::ResourceRef'
    1>c:{localpath}\urho\bindings\portable\generated\binding.cpp(1978): warning C4190: 'Sprite2D_SaveToResourceRef' has C-linkage specified, but returns UDT 'Urho3D::ResourceRef' which is incompatible with C
    1> c:{localpath}\urho\urho3d\urho3d_hololens\include\urho3d\core\variant.h(114): note: see declaration of 'Urho3D::ResourceRef'

    ... many more similar ...

    and finally ...

    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(1189,5): warning MSB8012: TargetPath(C:{localpath}\urho\Debug\UrhoSharp.HoloLens\UrhoSharp.HoloLens.dll) does not match the Linker's OutputFile property value (C:{localpath}\urho\Bin\HoloLens\mono-holourho.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
    1> Creating library ......\Bin\HoloLens\mono-holourho.lib and object ......\Bin\HoloLens\mono-holourho.exp
    1>SDL_winrtvideo.obj : error LNK2019: unresolved external symbol "void __cdecl WINRT_InitGameBar(struct SDL_VideoDevice *)" (?WINRT_InitGameBar@@Z) referenced in function "int __cdecl WINRT_VideoInit(struct SDL_VideoDevice *)" (?WINRT_VideoInit@@Z)
    1>SDL_winrtvideo.obj : error LNK2019: unresolved external symbol "void __cdecl WINRT_QuitGameBar(struct SDL_VideoDevice *)" (?WINRT_QuitGameBar@@Z) referenced in function "void __cdecl WINRT_VideoQuit(struct SDL_VideoDevice *)" (?WINRT_VideoQuit@@Z)
    1>......\Bin\HoloLens\mono-holourho.dll : fatal error LNK1120: 2 unresolved externals

  • utekaiutekai USMember ✭✭
    edited November 2016

    The xamarin forum editor won't let me post comments, but will let me post a picture of the comments ...

    http://screencast.com/t/ecndXPlylMAy

    Some additional info. The visual studio output window provides a number of warnings, for instance:

    http://screencast.com/t/0MnR0NY5qdr

    Again, unable to post directly, the xamarin forums editor provides ZERO feedback on what is wrong.

    Here's the full output window in pictures for compiling native/urhosharp..hololens:

    http://screencast.com/t/09Ln6j0afmz1
    http://screencast.com/t/8j3VI2SzE8o4
    http://screencast.com/t/QCgUzedBd
    http://screencast.com/t/qO8JytG5cvw

    There is a readme I found at https://github.com/xamarin/urho/blob/master/README.md but it doesn't help.

    It specifies to use --recursive on the initial git clone, and if that is done, then the git submodule init does nothing. Some projects do compile, but mostly not. Different set of errors though.

    I realize that someone who can already get this code to compile likely will not be seeing the errors I'm seeing, as I'm working on a machine that has yet to compile this.

    Also, the nuget package won't allow deployment.

    Please can anyone assist?

  • utekaiutekai USMember ✭✭
    edited November 2016

    Here is the entire output of 'make HoloLens' and at the end, a shot of the visual studio output window after attempting compilation of the native hololens project: http://screencast.com/t/dE9MuZO5

    Here are all the warnings generated during the compilation attempt of the native hololens project: http://screencast.com/t/DkEKGzcJo7


    In summary, there are many warnings, not sure if any are important. However the 2 unresolved external linkages keep it from compiling. Those are shown at the end of this video http://screencast.com/t/dE9MuZO5

    Was able to compile the native windows project after running 'make Windows32'
    'make UWP' doesn't run. The native UWP project won't compile.
    Attempting to compile the native windows d3d reults in 41 unresolved externals

  • utekaiutekai USMember ✭✭
    edited December 2016

    If I comment out the two unresolved external references then the code does compile.

    I'd like to post more details but everything I write except pure english text is rejected by xamarin forums.

    It does appear there have been issues with these two references in the past, due to the comments:

    ifdef __cplusplus

    /* These are exported as C++ functions, rather than C, to fix a compilation
    bug with MSVC 2013, for Windows 8.x builds. */
    extern void WINRT_InitGameBar(_THIS);
    extern void WINRT_QuitGameBar(_THIS);

    endif

  • EgorBoEgorBo BYXamarin Team ✭✭✭
    edited December 2016

    @utekai
    Indeed, those were added in Urho3D recently (SDL update). I've just fixed it in master, for further issues please create a new forum thread as it doesn't really relate to this one.

  • utekaiutekai USMember ✭✭
    edited December 2016

    I wrote about 10 posts trying to create a new issue for this.

    Each and every one went to the bucket labeled ... 'awaiting approval' ... from which nothing ever emerges once put there.


    Updated code and it almost compiles, but still getting this error:

    Error 0x80070057 Target C:{localpath}\urho\Release\UrhoSharp.HoloLens\UrhoSharp_HoloLens.pri does not exist UrhoSharp.HoloLens C:{localpath}\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\MakePri

    There is no folder labeled Release in the urho folder. Also the file doesn't exist anywhere.

  • utekaiutekai USMember ✭✭

    Ok, here's another attempt ... to do this had to setup keys with github ... then ...

    1. Ran 'git clone git@github.com:xamarin/urho.git'
    2. Changed directory into the urho directory
    3. Ran 'git submodule update --init' ...
    4. Verified urho3d/source is not empty ...
    5. ran 'make HoloLens' ... didn't see any errors, took a while to run, but seemed to run clean
    6. Opened solution in urho/urho3d/urho3d_hololens with visual studio 2015 ... compiled clean at first, until set the Hello World sample to run at startup, and then on compilation started throwing many errors about unresolved external symbols, for example:
      6.a.
      Error LNK1120 5 unresolved externals RampGenerator
      C:{localpath}\urho\Urho3D\Urho3D_HoloLens\bin\tool\RampGenerator.exe

    7. Opened solution in urho with visual studio 2015 ... this also has some problems ...
      7.a. Native/UrhoSharp.Hololens (UniversalWindows) doesn't compile. Throws two linking errors:

    Error LNK2019 unresolved external symbol "void __cdecl WINRT_InitGameBar(struct SDL_VideoDevice *)" (?WINRT_InitGameBar@@Z) referenced in function "int __cdecl WINRT_VideoInit(struct SDL_VideoDevice *)" (?WINRT_VideoInit@@Z) UrhoSharp.HoloLens
    C:{localpath}\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\SDL_winrtvideo.obj

    and

    Error LNK2019 unresolved external symbol "void __cdecl WINRT_QuitGameBar(struct SDL_VideoDevice *)" (?WINRT_QuitGameBar@@Z) referenced in function "void __cdecl WINRT_VideoQuit(struct SDL_VideoDevice *)" (?WINRT_VideoQuit@@Z) UrhoSharp.HoloLens
    C:{localpath}\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\SDL_winrtvideo.obj

    7.b Native/UrhoSharp.WUP(Universal Windows) doesn't compile. Throws errors like:
    Error C1083 Cannot open include file: 'Urho3D/Engine/Engine.h': No such file or directory UrhoSharp.UWP c:{localpath}\urho\urho3d\urho3d_uwp\monourho.uwp\swapchaindevice.cpp

    7.c. Actually none of the native projects will compile. Also getting errors (on WindowD3D as an example):
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory UrhoSharp.Windows
    c:{local path}\urho\bindings\Native\AllUrho.h

    Of the native projects, the native hololens project seems to come closest to compiling, but has the two linker errors shown above.

    1. Playgrounds.Hololens doesnt compile (same for playgrounds.uwp, though playgrounds.console does compile), Get error:
      Error Payload file 'C:{localpath}\urho\Bin\HoloLens\mono-holourho.dll' does not exist. Playgrounds.HoloLens

    2. Urho.HoloLens and Urho.WUP do compile.

  • utekaiutekai USMember ✭✭

    Ok, here's another attempt ... to do this had to setup keys with github ... then ...

    1. Ran 'git clone git@github.com:xamarin/urho.git'
    2. Changed directory into the urho directory
    3. Ran 'git submodule update --init' ...
    4. Verified urho3d/source is not empty ...
    5. ran 'make HoloLens' ... didn't see any errors, took a while to run, but seemed to run clean
    6. Opened solution in urho/urho3d/urho3d_hololens with visual studio 2015 ... compiled clean at first, until set the Hello World sample to run at startup, and then on compilation started throwing many errors about unresolved external symbols, for example:
      6.a.
      Error LNK1120 5 unresolved externals RampGenerator
      C:{localpath}\urho\Urho3D\Urho3D_HoloLens\bin\tool\RampGenerator.exe

    7. Opened solution in urho with visual studio 2015 ... this also has some problems ...
      7.a. Native/UrhoSharp.Hololens (UniversalWindows) doesn't compile. Throws two linking errors:

    Error LNK2019 unresolved external symbol "void __cdecl WINRT_InitGameBar(struct SDL_VideoDevice *)" (?WINRT_InitGameBar@@Z) referenced in function "int __cdecl WINRT_VideoInit(struct SDL_VideoDevice *)" (?WINRT_VideoInit@@Z) UrhoSharp.HoloLens
    C:{localpath}\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\SDL_winrtvideo.obj

    and

    Error LNK2019 unresolved external symbol "void __cdecl WINRT_QuitGameBar(struct SDL_VideoDevice *)" (?WINRT_QuitGameBar@@Z) referenced in function "void __cdecl WINRT_VideoQuit(struct SDL_VideoDevice *)" (?WINRT_VideoQuit@@Z) UrhoSharp.HoloLens
    C:{localpath}\urho\Urho3D\Urho3D_HoloLens\UrhoSharp.HoloLens\SDL_winrtvideo.obj

    7.b Native/UrhoSharp.WUP(Universal Windows) doesn't compile. Throws errors like:
    Error C1083 Cannot open include file: 'Urho3D/Engine/Engine.h': No such file or directory UrhoSharp.UWP c:{localpath}\urho\urho3d\urho3d_uwp\monourho.uwp\swapchaindevice.cpp

    7.c. Actually none of the native projects will compile. Also getting errors (on WindowD3D as an example):
    Error C1083 Cannot open include file: 'Urho3D/Urho3D.h': No such file or directory UrhoSharp.Windows
    c:{local path}\urho\bindings\Native\AllUrho.h

    Of the native projects, the native hololens project seems to come closest to compiling, but has the two linker errors shown above.

    1. Playgrounds.Hololens doesnt compile (same for playgrounds.uwp, though playgrounds.console does compile), Get error:
      Error Payload file 'C:{localpath}\urho\Bin\HoloLens\mono-holourho.dll' does not exist. Playgrounds.HoloLens

    2. Urho.HoloLens and Urho.WUP do compile.

  • hutchinskihutchinski USMember ✭✭

    Is there a fix for this yet? I can compile and run the urho samples for Android, WinForms, WPF. However, just as i was getting quite enthusiastic about urho, compiling and running for UWP gave me a serious headache.

    For UWP, the urho sample app compiles and loads, however when you try running an individual demo ( e.g. Character Demo, or Charts ), the app crashes with an error - Unable to load DLL 'mono-urho': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
    ( Also there is a warning about an async method lacking an await non-blocking API call ).

  • FlammableForkFlammableFork USMember
    edited October 12

    I know the originally posted issue was caused by something else, but as an attempt to help others experiencing this issue, let me share what ultimately fixed it for me.

    I never had a problem running the UrhoSharp-related pieces of my app on either iOS or Android. I also never had any issues running everything on my local machine. However, any time I would try to debug or deploy (UWP) to a remote machine either using Remote Debugger or sideloading a package I would be greeted by the error "Unable to load DLL 'mono-urho': The specified module could not be found" and nothing I did seemed to help. These remote machines were not development machines and had never had Visual Studio or the like installed. In an effort to rule certain things out, I started deploying the app to other development machines using Remote Debugger, and the app always seemed to work properly while the machine had Visual Studio installed. After installing Visual Studio on my non-development machines, the app starting working properly, and I ultimately narrowed the issue down to the lack of the Windows 10 SDK (while uninstalling everything Visual Studio installed, one by one). When the Windows 10 SDK was installed, the app would work. If I uninstalled the SDK, the app would no longer work.

    So, if you are experiencing an issue similar to the one I was, download the latest Windows 10 SDK installer (I found that you can go ahead and use the latest version even if your version of Windows 10 is a little older). During the install, you will need to install the 'Windows SDK for UWP Managed Apps' and its prerequisites. You can deselect everything else if you do not need it. Once I installed this (took a little while) my app suddenly started working properly.

    This seems like a really odd requirement and I hope this gets fixed at some point, especially since this would be a pain for anyone who wanted to download my app from the Windows Store as they would have to install the SDK first.

    Download the SDK here: developer.microsoft.com/en-us/windows/downloads/windows-10-sdk

  • FlammableForkFlammableFork USMember
    edited October 12

    I posted a little bit ago, but that comment seems to have disappeared.

    The original question as posted by MarcusSonestedt was caused by something else, but instead of creating a new question to post an answer (unless that would be preferred), please let me share what caused this issue for me.

    I never had a problem with either iOS or Android. I also never had an issue while running my UWP app on my development machine. This issue cropped up while trying to run the app on a different, non-development machine. The app would crash with the exception "Unable to load DLL 'mono-urho': The specified module could not be found" anytime I would try to use the UrhoSharp portions of my app on one of these machines. Long story short, I narrowed the problem down to the Windows 10 SDK, or lack thereof. After installing the SDK, my app works perfectly, and if I uninstall it, the issue returns.

    If your issue sounds similar to this, download and install the latest Windows 10 SDK on the problem machine. During install, if not needed, you can deselect everything except for 'Windows SDK for UWP Managed Apps' and its prerequisites/inclusions.

    This is an odd requirement and I certainly hope it gets fixed sometime, as this would require anyone wanting to install my app from the store to install the SDK first. As a reference, I am using the latest stable Nuget package (v1.5.22) of UrhoSharp.Forms, and I have tried many older versions with the same problem.

Sign In or Register to comment.