From: Earnie <ea...@us...> - 2011-04-21 20:13:07
|
Jim Bell wrote: > > > On 1:59 PM, Earnie wrote: >> Jim Bell wrote: >>> Compile: >>> g++ Prog.cpp -DWIN32 -D_WINDOWS -D_DEBUG -D__MSVCRT_VERSION__=0x0800 >>> -mthreads -g -frtti -fexceptions -mthreads -Wall -lstdc++ -lmingw32 -o >>> Prog -lmsvcr90 >> Try g++ Prog.cpp -DWIN32 -D_WINDOWS -D_DEBUG -D__MSVCRT_VERSION__=0x0800 >> -DWINVER=0x0800 -mthreads -g -frtti -fexceptions -mthreads -Wall -o Prog >> -lmsvcr90 >> >> Note that I added -DWINVER-0x0800 and dropped the -lstdc++ and -lmingw32 >> from the command line. I did not test this so you may still get the >> linker error. > > THIS WORKS! Thanks! > > But it doesn't run. I get R6034 ("An application has made an attempt to > load the C runtime library incorrectly....") > <http://msdn.microsoft.com/en-us/library/ms235560%28VS.80%29.aspx> and > 0xc0000142 (STATUS_DLL_INIT_FAILED, > <http://msdn.microsoft.com/en-us/library/cc704588%28PROT.10%29.aspx>). > > I'm pretty sure it's not happy with the location of the .DLL. I'm > following the instructions in your previous e-mail... > Yea, you need a manifest file, see http://msdn.microsoft.com/en-us/library/ms235624(v=VS.80).aspx. Pay attention to the first paragraph about the WinSxS folder. You'll have to work out that detail. > On 1:59 PM, Earnie wrote: >> >> ... Make sure >> that you distribute the dll in a mybinary.exe.local directory which is >> parented to the same directory containing mybinary.exe. E.G. >> mybinary.exe is in directory c:\Program >> Files\MyPackages\bin\mybinary.exe then create c:\Program >> Files\MyPackages\bin\mybinary.exe.local and put the dependent DLLs in >> that directory. >> > > If I put msvcr90.dll anywhere else (e.g., Microsoft.VC90.CRT directory), > I get "Unable to Locate Component: This application has failed to start > because msvcr90.dll was not found." > You would need to add the directory to PATH or use the Windows API to give the location of the dll search path. > I think it wants a manifest .rc/.res/.o file. I think so. Maybe even the one for msvcr90.dll. -- Earnie -- http://www.for-my-kids.com |