Generating Code from RTW and compiling using MSVC++ 2008 express edition

4 views (last 30 days)
Hello,
I'm using Matlab 2010a (32bit) & MSVC++ 2008 express edition with SDk v6.1. I am able to build dll's using RTW for 32bit applications without any trouble.
However I cannot do the same for 64bit applications (obviously as Matlab 2010a is 32bit version).
Therefore I wonder if I can use the RTW generated code and take it into MSVC++ 2008 environment and compile the code targeting 64bit platform.
If possible, can someone kindly direct me to an example which does/explains the above step by step (as ive never ever used MSVC++ 2008 express edition GUI environment)?
PS: I've installed x64 components of the compiler.
Cheers,

Accepted Answer

Kaustubha Govind
Kaustubha Govind on 2 Mar 2012
I don't know if this has been tried before, so I can't provide a link to an existing example. However, it should definitely be possible. I think the easiest way is to select the System target file (in the Configuration Parameters window's Code Generation pane) that corresponds to "Create Visual C/C++ solution file" - this should create a Visual Studio project (solution file) that you can directly load into Visual Studio - hopefully the only changes you will need to make are the ones related to the x64 target.
  3 Comments
Kaustubha Govind
Kaustubha Govind on 5 Mar 2012
You should refer to Microsoft documentation for help using Visual Studio. You can grab all the header, source and library files needed for compilation using the packNGo function in MATLAB. See: http://blogs.mathworks.com/seth/2008/11/26/wheres-the-code/
Once you have all the required code, you can create a Visual Studio project just like you would with any other code.
Nihal
Nihal on 6 Mar 2012
Thanks for your response, i'll try out the suggestions and get back if i have further questions.
Thanks once again.

Sign in to comment.

More Answers (0)

Categories

Find more on C Shared Library Integration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!