Search Unity

Distributing game using a C++ dll that calls boost code.

Discussion in 'Scripting' started by zerophase, Feb 22, 2016.

  1. zerophase

    zerophase

    Joined:
    Nov 5, 2013
    Posts:
    25
    I'm having an issue where I cannot get my game to run on other computers. In it I'm using some C++ code to deal with com ports. That C++ code uses classes from boost asio to read and open com ports.

    When I check the dlls used in the build's exe. I see SerialBufferController.dll loading on my machine, but not on the virtual machine I'm checking it on. It's in the plugins Game_Data folder under plugins, both on my guest and host.

    What else would I have to do to get the dll to load up on my virtual machine?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    I forget the exact rules of com/DLL finding/binding/loading but I seem to recall them closely tied to local system search path.

    On your dev system, do you have the DLL in question available elsewhere in your path?

    On the remote VM system, can you copy the DLL to the same location as the Unity executable?
     
  3. zerophase

    zerophase

    Joined:
    Nov 5, 2013
    Posts:
    25
    I can try copying the boost libs to the same system path on the vm. I think it might be how I'm linking to boost.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
  5. zerophase

    zerophase

    Joined:
    Nov 5, 2013
    Posts:
    25
    Yeah, I need to get the crash log from team mates computer to help figure this out.
     
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    zerophase likes this.
  7. zerophase

    zerophase

    Joined:
    Nov 5, 2013
    Posts:
    25
    I kind of wish it would just work like Linux, where you can just drop a folder somewhere, and give the path.
     
  8. zerophase

    zerophase

    Joined:
    Nov 5, 2013
    Posts:
    25
    Well as of right now, it looks like it was my code that finds the available com ports that was causing the game to crash. Anything above 9 and above 99 would do that. So, what algorithm would I want to look up to determine where the end of the string being copied should be?