Page 1 of 1
"cannot find redist dir" *solved*
Posted: 27 Sep 2016, 09:16
by lbotrel
When i compile I get this message from the console of visual studio:
Code: Select all
Creating Bundle:
Cannot find redist dir:
Executable may fail to run when moved to a different machine.
It compiles properly, then executes on my computer, but on other computers some modules (e.g. p3signalprocessing.exe) fail when the c++ redist 2012 isn't installed.
Only when I removed the USE_APPLICATION_BUNDLES, i got the message "missing msvcr11.dll" and understood the issue.
Is there any way to properly point to those redist during compilation, or should i choose the easy way and systematically install c++ redist 2012 on target computers ?
Bug report on rev5548, using visual studio express 2012 compiler x64,
Best regards,
Loic
Re: "cannot find redist dir" *solved*
Posted: 27 Sep 2016, 12:17
by lbotrel
I just noticed the error is new because J Mellinger (nicely) added this error message one week ago in the svn.
I took a look at list_dependencies.cpp and added in the argument lookup loop
Code: Select all
for( int i = 1; i < argc; ++i )
{
cerr << "arguments "<<argv[i] << endl;
....
and it returns during compilation
Code: Select all
> arguments --redist
> arguments --add-redist-dir
> arguments my
> arguments bci2000
> arguments path
> arguments with
> arguments spaces/build/vs2012x64/CMakeFiles/extlib/qt-5.3.2/win32-amd64-msvc2012/bin
> arguments C:\BCI\dev\my BCI2000 path with spaces\build\vs2012x64\CMakeFiles\core\Tools\cmdline\Release\ExpressionFilter.exe
So, the fix is to use a path without whitespaces (confirmed working)
Re: "cannot find redist dir" *solved*
Posted: 27 Sep 2016, 13:49
by pbrunner
Loic,
you can actually inspect the bundled executable by renaming it to a .zip extension. You should see the msvcr11.dll in this zip archive. Alternatively the post-compiling step should copy the msvcr11.dll into the prog directory if the app bundling is disabled. If I correctly understand, in your case this is not the case for both cases and you have tracked this down to a white space. Can you confirm this and specify the path that has a white space?
Regards, Peter
Re: "cannot find redist dir" *solved*
Posted: 28 Sep 2016, 04:42
by lbotrel
Thanks for the very quick answer Peter,
maybe i've been a bit too deep into the details without giving the simple picture.
After breaking down the argument parsing in list_dependencies.cpp, i found there was a mishandling due to whitespaces in my BCI2000 root
Using the code in my last post (argument print loop), the automatically generated line
Code: Select all
--redist --add-redist-dir my bci2000 path withspaces/build/vs2012x64/CMakeFiles/extlib/qt-5.3.2/win32-amd64-msvc2012/bin C:\BCI\dev\my BCI2000 path with whitespaces\build\vs2012x64\CMakeFiles\core\Tools\cmdline\Release\ExpressionFilter.exe
is splitted into
Code: Select all
--redist
--add-redist-dir
my
bci2000
path
with
whitespaces/build/vs2012x64/CMakeFiles/extlib/qt-5.3.2/win32-amd64-msvc2012/bin
C:\BCI\dev\my BCI2000 path with whitespaces\build\vs2012x64\CMakeFiles\core\Tools\cmdline\Release\ExpressionFilter.exe
[/code]
I do not know exactly where the issue takes place, but I know that not using whitespaces solved my issue (and includes vcomp110.dll by renaming to .zip)