Home > Software engineering >  Matlab2014 vs2010 call the exported DLL initialization library failed!
Matlab2014 vs2010 call the exported DLL initialization library failed!

Time:10-01

Using matlab2014 edition write m files exported DLL files, want to call in the under vs2010 MFC procedures, tried various configuration, has been stuck in tezhengzhiInitialize () (DLL named tezhengzhi. DLL), is the initialization failed, breakpoint debugging to ExitProcess (status);
First - chance exception at 0 x032343c0 in EquipMonitor. Exe: 0 xc0000005: Access violation.
Unhandled exception at 0 x032343c0 in EquipMonitor. Exe: 0 xc0000005: Access violation.
Who had a similar problem, is the matlab version to be the problem? Cause the exported DLL and vs2010 incompatible, or MFC DLL needs to pay attention to what other call??

CodePudding user response:

Need to see the matlab and vc to see if the vc version are the same would not be compatible with different versions

CodePudding user response:

Is the same, automatic identification of matlab:
Tex-mex configured to use the 'Microsoft Visual c + + 2010 Professional to compile c + + language,

CodePudding user response:

Don't be A language code is modified to B language code busywork,
Also don't use A language code to directly invoke B language code base, this complicated things so easy to get wrong,
Just make A, B language code of input and output is redirected to A text file, or modify A, B language code let it through text file input and output,
Can easily make A, B coordination between the two languages,
For example:
A will request data written to A file a.t xt, renamed after finish aa. TXT
B find aa. TXT, read its contents, call the corresponding function, and writes the results file b.t xt, after finish delete aa. TXT, changed its name to bb. TXT
Found A bb. TXT, read the content, after finish delete bb. TXT
Above can be replaced by any kind of A language or development environment, B can be replaced by any kind of with the development of A different language or development environment,
Unless A or B does not support to determine whether A file exists, file read and write and file name,
But who can name does not support to determine whether a file exists, file read and write and file name for the development of language or development environment?
Can put the temporary files on the RamDisk efficiency decrease wear disk,
Data structure is very complex, a text file format problems refer to a json or XML

The communication methods between the temporary text file sharing this process there are plenty of advantages, compared to other method only listed below I can think of now:
Loose coupling between process,
Can be on the same machine, process, also can cross machine, across the operating system, hardware platform, and even multinational,
, convenient debugging, and monitoring, only let the third party or artificial view the temporary text files,
Switch, convenient online service, need to delete or create the temporary text files,
, is convenient to realize distributed and load balancing,
Services to provide convenient, queue, queue is full and it is almost impossible to happen (unless the hard disk space full)
DE...

"Across different languages, machine, across the operating system, hardware platform, multinational, cross *. *" this suffering,
back "exchange of information using Shared plain text file" shore!

CodePudding user response:

If through text files to coordinate vs and matlab, click on the button in the MFC, parameters into temporary text file first, and then opens the matlab m file, read the required parameters from the temporary files, so, need to click on the run button in the m file again to call, so that feel step a little bit more

CodePudding user response:

Sets the active configuration platform to any CPU or x64 give it a try

CodePudding user response:

reference 4 floor missfengdian response:
if coordination vs and matlab through text files, click on the button in the MFC, parameters into temporary text file first, and then opens the matlab m file, read the required parameters from the temporary files, so, need to click on the run button in the m file again to call, as a result, feel more steps a bit

According to this statement, you bring the UI interprocess communication process can only rely on people click on the button manually triggered? !
You won't be one of the following three methods to use?
(1) in the MFC WinExec start matlab and automatically run a specified program matlab
(2) in the matlab program automatically start MFC written exe
(3) the batch or the parent process and matlab and MFC written exe has started

CodePudding user response:

The timer is made?
Cycle is made?
Pipe is made?
"The art of Unix programming"
  • Related