Having Issue with NxCore C++ Program ran with WINE

Discussion in 'App Development' started by IAS_LLC, Aug 8, 2014.

  1. IAS_LLC

    IAS_LLC

    I have a C++ program that I compiled in Ubuntu using the x86_64-w64-mingw32-g++ compiler, and the following linker flags (probably the wrong terminology): -static-libgcc -static-libstdc++

    The program compiles fine, but when I go to try to run it with WINE, it nearly completes and crashes at the end with the following error

    wine: Call from 0x7fde2826ee6a to unimplemented function MSVCR90.dll.__C_specific_handler, aborting

    If I run the same program (no recompile) under Windows 7 (I dual boot), the program runs with no issues, so I'm fairly certain that this is a wine issue.

    My program is using the NxCore DataFeed API (the only reason I would even go anywhere near anything windows related...), and they also offer a 32bit DLL for their API, which I can get to run just fine under wine using the i686-w64-mingw32-g++ compiler. I dont want to have to do this though, since I'm running a 64 Bit machine (Intel I7), and I THINK the x86 compiler is more appropriate for me (I could be wrong?).

    I am not useing the "wineg++" compiler because it can't seem to find "windows.h", and the NxCore API needs that.

    Any help would be greatly appreciated.

    Thanks, Brad
     
  2. vicirek

    vicirek

    There is a difference how dynamic linking is done on Linux (g++) vs Windows (vc). Linux has more relaxed way of checking and linking symbols from dynamic libraries at compile and link time. Program compiles and links "trusting" that this or another process will have this particular dll loaded and symbols with binaries will be available at run time and the relative address can be resolved. Apparently under Wine environment this is not the case for this dll which is Microsoft specific. One solution is to force loading this dll in your source code or compiler/linker flag. There is also a difference which directories are being searched for dynamic libraries and resolving this is also recommended. Unfortunately I have no experience with Wine or mingw so I am not sure that this is the exact issue but it is a strong possibility not to mention that this dll may require another and so on and this may get even more interesting.
     
  3. Craig66

    Craig66

    Have you installed the windows redistributables under Wine?
     
    eusdaiki likes this.
  4. IAS_LLC

    IAS_LLC

    I dont believe so? I just installed Wine from my package manager, and assumed I was good to go. It worked for the 32bit version, and mostly works for the 64, up intil the very end.

    How do I check if I have done that, or how do I do that? Sorry for being naive.

    Thanks,
    Brad
     
  5. Craig66

    Craig66

    If you have a look under at the control panel/uninstall window, you'll see a bunch of entries that look like 'Microsoft Visual C++ 2010 x86 Redist' blah blah. These are the runtime files for programs which are complied using Visual Studio. I know that IQFeed automatically installs the relevant redistributables, so I would assume NxCore would as well? The error you're getting looks like a runtime file is missing, specifically for Microsoft Visual C++ 2008, so I would check that the redistributables for Microsoft Visual C++ 2008 are installed.
     
  6. IAS_LLC

    IAS_LLC


    Just did this download http://www.microsoft.com/en-us/download/confirmation.aspx?id=5582 of the Visual Studio C++ redistriputable package, ran the installation exe under wine. Same problem exists.

    Is it possible WINE is looking in the wrong place for the DLL, because it does exist? Any idea how I would check this?
     
  7. Craig66

    Craig66

    No idea sorry, that's were my WINE knowledge ends.
    I would ask on the NxCore forum (I assume they have one).
     
  8. IAS_LLC

    IAS_LLC

    Unfortunately the NxCore Forum isn't very active. I have been emailing with their support team (they are very helpful people!) and they are looking into it :) .

    Thanks for your help.
     
  9. vicirek

    vicirek

    If Wine "works" like Windows then it will look for dll in the directory where your executable resides in addition to regular dll repositories in the windows system folders. Try to grab that MSVCR90.dll and copy it there. It still might not work because of other issues like 64bit vs 32bit binary but it is quick fix that might just help.
     
  10. IAS_LLC

    IAS_LLC

     
    #10     Aug 8, 2014