Cannot compile to 32 bit using Matlab Coder

조회 수: 7 (최근 30일)
Kunal Shitut
Kunal Shitut 2020년 11월 1일
댓글: Kunal Shitut 2020년 11월 1일
I am a new Matlab user trying to use the Vision toolbox. I have been trying to compile my matlab program to a 32bit dll from my 64 bit windows machine. Here are the settings that I select:
But I am getting an error as follows:
### Creating dynamic library ".\detectTemplateInImage.dll" ...
link /RELEASE /INCREMENTAL:NO /NOLOGO kernel32.lib ws2_32.lib mswsock.lib advapi32.lib -dll -def:detectTemplateInImage.def `pkg-config --cflags --libs opencv` /nodefaultlib:vcomp -out:.\detectTemplateInImage.dll @detectTemplateInImage_rtw.rsp /LIBPATH:"C:\PROGRA~1\MATLAB\R2020b\bin\win64" "C:\PROGRA~1\MATLAB\R2020b\bin\win64\libiomp5md.lib"
LINK : warning LNK4044: unrecognized option '/-cflags'; ignored
LINK : warning LNK4044: unrecognized option '/-libs'; ignored
LINK : fatal error LNK1181: cannot open input file '`pkg-config.obj'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\link.EXE"' : return code '0x49d'
Stop.
The make command returned an error of 2
Error(s) encountered while building "detectTemplateInImage"
It seems to be an error with OpenCV but I don't know how to solve it exactly. Would greatly appreciate any help.
Thank you

채택된 답변

Walter Roberson
Walter Roberson 2020년 11월 1일
It was possible in R2015b and earlier to compile for 32 bit dll. It is not possible in any release since then.
It looks like you might have other setup problems, but even if you solved those it would not be possible to compile to 32 bits.
  댓글 수: 3
Walter Roberson
Walter Roberson 2020년 11월 1일
That page is implying that you would not be able to use mingw as the compiler with the libraries that they supply.
The libraries that they supply are 64 bit libraries.
To have a chance with 32 bit you would need 32 bit OpenCV DLLs, either finding them somewhere or compiling yourself.
Kunal Shitut
Kunal Shitut 2020년 11월 1일
Oh okay, thanks. I will look into doing it that way or some other method.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by