Generated C++ code using MATLAB Coder : Compilation Error “undefined reference to `rgb2gray_tbb_real64'”
up vote
1
down vote
favorite
Generated C++ code from MATLAB for converting an image to grayscale, using MATLAB Coder. While compiling it on Dev C++ it shows error- undefined reference to rgb2gray_tbb_real64
One of the Generated code uses header file libmwrgb2gray_tbb.h
. Screenschot It calls a function rgb2gray_tbb_real64
, which is not defined anywhere.
How to sort this out?
c++ matlab matlab-coder
add a comment |
up vote
1
down vote
favorite
Generated C++ code from MATLAB for converting an image to grayscale, using MATLAB Coder. While compiling it on Dev C++ it shows error- undefined reference to rgb2gray_tbb_real64
One of the Generated code uses header file libmwrgb2gray_tbb.h
. Screenschot It calls a function rgb2gray_tbb_real64
, which is not defined anywhere.
How to sort this out?
c++ matlab matlab-coder
1
Please don't post images of code and error messages. Instead, copy-paste them into your question. Images are not searchable, and not easy (or impossible) to read for people with visual disabilities.
– Cris Luengo
Oct 31 at 5:17
1
Regarding your question: did you follow the instructions in Coder related to linking in the appropriate libraries? It looks like a library needs to be linked in.
– Cris Luengo
Oct 31 at 5:28
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Generated C++ code from MATLAB for converting an image to grayscale, using MATLAB Coder. While compiling it on Dev C++ it shows error- undefined reference to rgb2gray_tbb_real64
One of the Generated code uses header file libmwrgb2gray_tbb.h
. Screenschot It calls a function rgb2gray_tbb_real64
, which is not defined anywhere.
How to sort this out?
c++ matlab matlab-coder
Generated C++ code from MATLAB for converting an image to grayscale, using MATLAB Coder. While compiling it on Dev C++ it shows error- undefined reference to rgb2gray_tbb_real64
One of the Generated code uses header file libmwrgb2gray_tbb.h
. Screenschot It calls a function rgb2gray_tbb_real64
, which is not defined anywhere.
How to sort this out?
c++ matlab matlab-coder
c++ matlab matlab-coder
edited Oct 31 at 7:37
Clock Slave
2,11642249
2,11642249
asked Oct 31 at 4:45
Ritwick Mohan
61
61
1
Please don't post images of code and error messages. Instead, copy-paste them into your question. Images are not searchable, and not easy (or impossible) to read for people with visual disabilities.
– Cris Luengo
Oct 31 at 5:17
1
Regarding your question: did you follow the instructions in Coder related to linking in the appropriate libraries? It looks like a library needs to be linked in.
– Cris Luengo
Oct 31 at 5:28
add a comment |
1
Please don't post images of code and error messages. Instead, copy-paste them into your question. Images are not searchable, and not easy (or impossible) to read for people with visual disabilities.
– Cris Luengo
Oct 31 at 5:17
1
Regarding your question: did you follow the instructions in Coder related to linking in the appropriate libraries? It looks like a library needs to be linked in.
– Cris Luengo
Oct 31 at 5:28
1
1
Please don't post images of code and error messages. Instead, copy-paste them into your question. Images are not searchable, and not easy (or impossible) to read for people with visual disabilities.
– Cris Luengo
Oct 31 at 5:17
Please don't post images of code and error messages. Instead, copy-paste them into your question. Images are not searchable, and not easy (or impossible) to read for people with visual disabilities.
– Cris Luengo
Oct 31 at 5:17
1
1
Regarding your question: did you follow the instructions in Coder related to linking in the appropriate libraries? It looks like a library needs to be linked in.
– Cris Luengo
Oct 31 at 5:28
Regarding your question: did you follow the instructions in Coder related to linking in the appropriate libraries? It looks like a library needs to be linked in.
– Cris Luengo
Oct 31 at 5:28
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
Image Processing Toolbox code generation supports 2 distinct modes:
- Generated code uses platform-specific optimized shared libraries. This is enabled for the MATLAB Coder hardware target
MATLAB Host Computer
and a few other similar targets. - Generated code is standalone, independent of shared libraries, and portable
The documentation covers these concepts in more detail. When using option (1), you must package the generated code using Coder utilities in order to relocate it. MATLAB Coder knows how to properly gather and package all of the dependencies for your generated code.
To do this packaging, you can use the packNGo
function, use the Package
button on the Finish Workflow
screen of the MATLAB Coder App, or the Package Code
button in the MATLAB Coder report. These steps are detailed in the MATLAB Coder documentation. To use packNGo
you can:
codegen myFunction -args 1,2,3 -config:lib -report
load(fullfile('codegen','lib','myFunction','buildInfo.mat'));
packNGo(buildInfo, 'fileName', 'myFunction.zip');
That will create myFunction.zip
in your current directory which will contain your generated code and all of the headers and libraries on which it depends. You can then import all of those into your IDE of choice.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Image Processing Toolbox code generation supports 2 distinct modes:
- Generated code uses platform-specific optimized shared libraries. This is enabled for the MATLAB Coder hardware target
MATLAB Host Computer
and a few other similar targets. - Generated code is standalone, independent of shared libraries, and portable
The documentation covers these concepts in more detail. When using option (1), you must package the generated code using Coder utilities in order to relocate it. MATLAB Coder knows how to properly gather and package all of the dependencies for your generated code.
To do this packaging, you can use the packNGo
function, use the Package
button on the Finish Workflow
screen of the MATLAB Coder App, or the Package Code
button in the MATLAB Coder report. These steps are detailed in the MATLAB Coder documentation. To use packNGo
you can:
codegen myFunction -args 1,2,3 -config:lib -report
load(fullfile('codegen','lib','myFunction','buildInfo.mat'));
packNGo(buildInfo, 'fileName', 'myFunction.zip');
That will create myFunction.zip
in your current directory which will contain your generated code and all of the headers and libraries on which it depends. You can then import all of those into your IDE of choice.
add a comment |
up vote
2
down vote
Image Processing Toolbox code generation supports 2 distinct modes:
- Generated code uses platform-specific optimized shared libraries. This is enabled for the MATLAB Coder hardware target
MATLAB Host Computer
and a few other similar targets. - Generated code is standalone, independent of shared libraries, and portable
The documentation covers these concepts in more detail. When using option (1), you must package the generated code using Coder utilities in order to relocate it. MATLAB Coder knows how to properly gather and package all of the dependencies for your generated code.
To do this packaging, you can use the packNGo
function, use the Package
button on the Finish Workflow
screen of the MATLAB Coder App, or the Package Code
button in the MATLAB Coder report. These steps are detailed in the MATLAB Coder documentation. To use packNGo
you can:
codegen myFunction -args 1,2,3 -config:lib -report
load(fullfile('codegen','lib','myFunction','buildInfo.mat'));
packNGo(buildInfo, 'fileName', 'myFunction.zip');
That will create myFunction.zip
in your current directory which will contain your generated code and all of the headers and libraries on which it depends. You can then import all of those into your IDE of choice.
add a comment |
up vote
2
down vote
up vote
2
down vote
Image Processing Toolbox code generation supports 2 distinct modes:
- Generated code uses platform-specific optimized shared libraries. This is enabled for the MATLAB Coder hardware target
MATLAB Host Computer
and a few other similar targets. - Generated code is standalone, independent of shared libraries, and portable
The documentation covers these concepts in more detail. When using option (1), you must package the generated code using Coder utilities in order to relocate it. MATLAB Coder knows how to properly gather and package all of the dependencies for your generated code.
To do this packaging, you can use the packNGo
function, use the Package
button on the Finish Workflow
screen of the MATLAB Coder App, or the Package Code
button in the MATLAB Coder report. These steps are detailed in the MATLAB Coder documentation. To use packNGo
you can:
codegen myFunction -args 1,2,3 -config:lib -report
load(fullfile('codegen','lib','myFunction','buildInfo.mat'));
packNGo(buildInfo, 'fileName', 'myFunction.zip');
That will create myFunction.zip
in your current directory which will contain your generated code and all of the headers and libraries on which it depends. You can then import all of those into your IDE of choice.
Image Processing Toolbox code generation supports 2 distinct modes:
- Generated code uses platform-specific optimized shared libraries. This is enabled for the MATLAB Coder hardware target
MATLAB Host Computer
and a few other similar targets. - Generated code is standalone, independent of shared libraries, and portable
The documentation covers these concepts in more detail. When using option (1), you must package the generated code using Coder utilities in order to relocate it. MATLAB Coder knows how to properly gather and package all of the dependencies for your generated code.
To do this packaging, you can use the packNGo
function, use the Package
button on the Finish Workflow
screen of the MATLAB Coder App, or the Package Code
button in the MATLAB Coder report. These steps are detailed in the MATLAB Coder documentation. To use packNGo
you can:
codegen myFunction -args 1,2,3 -config:lib -report
load(fullfile('codegen','lib','myFunction','buildInfo.mat'));
packNGo(buildInfo, 'fileName', 'myFunction.zip');
That will create myFunction.zip
in your current directory which will contain your generated code and all of the headers and libraries on which it depends. You can then import all of those into your IDE of choice.
edited Nov 11 at 0:50
answered Nov 2 at 19:28
Ryan Livingston
1,486616
1,486616
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53076455%2fgenerated-c-code-using-matlab-coder-compilation-error-undefined-reference-t%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Please don't post images of code and error messages. Instead, copy-paste them into your question. Images are not searchable, and not easy (or impossible) to read for people with visual disabilities.
– Cris Luengo
Oct 31 at 5:17
1
Regarding your question: did you follow the instructions in Coder related to linking in the appropriate libraries? It looks like a library needs to be linked in.
– Cris Luengo
Oct 31 at 5:28