Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
64bit Matlab with 32 bit Visual Studio

Subject: 64bit Matlab with 32 bit Visual Studio

From: Rafael

Date: 7 May, 2013 22:45:07

Message: 1 of 3

I am having linking problems. I can compile simple cpp files using mex in Matlab but when I add an external library I get LNK2019 unresolved external symbol.

I am pretty sure I am linking correctly. Is there a chance that the problem is related with the fact that my Matlab is 64 bit and I am using Visual Studio 2010 compiler (which is 32 bit)?

Subject: 64bit Matlab with 32 bit Visual Studio

From: James Tursa

Date: 8 May, 2013 04:05:10

Message: 2 of 3

"Rafael " <rafartc25@gmail.com> wrote in message <kmc05j$1n9$1@newscl01ah.mathworks.com>...
> I am having linking problems. I can compile simple cpp files using mex in Matlab but when I add an external library I get LNK2019 unresolved external symbol.
>
> I am pretty sure I am linking correctly. Is there a chance that the problem is related with the fact that my Matlab is 64 bit and I am using Visual Studio 2010 compiler (which is 32 bit)?

You can't run 32-bit software with 64-bit MATLAB. The mex file will need to be compiled with a 64-bit compiler (or switch to 32-bit MATLAB).

James Tursa

Subject: 64bit Matlab with 32 bit Visual Studio

From: reza

Date: 8 May, 2013 04:17:22

Message: 3 of 3

On Tuesday, May 7, 2013 6:45:07 PM UTC-4, Rafael wrote:
> I am having linking problems. I can compile simple cpp files using mex in Matlab but when I add an external library I get LNK2019 unresolved external symbol.
>
>
>
> I am pretty sure I am linking correctly. Is there a chance that the problem is related with the fact that my Matlab is 64 bit and I am using Visual Studio 2010 compiler (which is 32 bit)?

visual basic 2010 32 bit, can in fact, compile into 64 bit binary, make sure you have 64bit switch on.

/reza

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us