create 32 bit dll from matlab coder 2017

10 visualizzazioni (ultimi 30 giorni)
Hi, is there a way to create a 32bit dll with matlab coder 2017? If yes is it by changing the Toolchain ? And if it is by changing the toochain what do i have to do to add it to the list? and yes i saw: https://www.mathworks.com/examples/matlab-coder/mw/coder-ex19875030-build-32-bit-dll-on-64-bit-windows-reg-platform-using-msvc-toolchain (but i dont know what to do with it, I'm pretty new to those thing)

Risposta accettata

Philippe Blain
Philippe Blain il 7 Feb 2018
I resolve my problem: step:
  1. Download visual studio 2017
  2. Enter the following code( it come from Build 32-bit DLL on 64-bit Windows® Platform Using MSVC Toolchain :
VersionNumbers = {'14.0'}; % Placeholder value
if ~ispc
supportedCompilerInstalled = false;
else
installed_compilers = mex.getCompilerConfigurations('C', 'Installed');
MSVC_InstalledVersions = regexp({installed_compilers.Name}, 'Microsoft Visual C\+\+ 20\d\d');
if isempty(MSVC_InstalledVersions)
supportedCompilerInstalled = false;
else
VersionNumbers = {installed_compilers(cellfun(@(a)~isempty(a), MSVC_InstalledVersions)).Version}';
supportedCompilerInstalled = true;
end
end
save my_msvc_32bit_tc tc;
copyfile myRtwTargetInfo.txt rtwTargetInfo.m RTW.TargetRegistry.getInstance('reset');
  • after I got the error fatal error U1052 from the visual studio compiler and I enter :
setenv('VSCMD_START_DIR','%CD%')
  • if it dont work for error U1052 go tho the original page of the answer: original or this page second page

Più risposte (0)

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by