Home > Software engineering >  MFC to do a simple interface, click the button to call matcom m file, run: implement cl. Exe error
MFC to do a simple interface, click the button to call matcom m file, run: implement cl. Exe error

Time:10-25

C beginners, using MFC to do a simple interface, there is only one button, click the output graph, the source code is written by matlab, installed matcom transformation, run when the error code,,, can you tell me where the problem is?? Note: according to the baidu solution, look at some of the path, apparently yes:
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- the Configuration: Demo - Win32 Debug -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Compiling...
DemoDlg. CPP
C: \ WWKK \ Demo \ DemoDlg CPP (175) : error C2065: 'initM: undeclared identifier
C: \ WWKK \ Demo \ DemoDlg CPP (175) : error C2065: 'MATCOM_VERSION: undeclared identifier
C:/matcom45/samples/not m (1) : error C2065: 'dMm: undeclared identifier
C:/matcom45/samples/not m (1) : error C2065: 't1' : undeclared identifier
C:/matcom45/samples/not m (1) : error C2065: 'y' : undeclared identifier
C:/matcom45/samples/not m (1) : error C2065: 'call_stack_begin: undeclared identifier
C:/matcom45/samples/not m (1) : error C2065: '_' : undeclared identifier
C:/matcom45/samples/not m (1) : error C2146: syntax error: missing '; 'before the identifier' t1 '
C:/matcom45/samples/not m (1) : error C2065: 'colon: undeclared identifier
C:/matcom45/samples/not m (2) : error C2146: syntax error: missing '; 'before the identifier' y '
C:/matcom45/samples/not m (2) : error C2065: 'sinc: undeclared identifier
C:/matcom45/samples/not) m (3) : error C2146: syntax error: missing '; 'before the identifier' plot '
C:/matcom45/samples/not) m (3) : error C2065: 'plot' : undeclared identifier
C:/matcom45/samples/not) m (3) : error C2065: 'CL: undeclared identifier
C:/matcom45/samples/not) m (3) : error C2146: syntax error: missing '; 'before the identifier' grid '
C:/matcom45/samples/not) m (3) : error C2065: 'grid' : undeclared identifier
C:/matcom45/samples/not m (4) : error C2146: syntax error: missing '; 'before the identifier' axis'
C:/matcom45/samples/not m (4) : error C2065: 'axis: undeclared identifier
C:/matcom45/samples/not m (4) : error C2065: 'BR: undeclared identifier
C:/matcom45/samples/not m (5) : error C2146: syntax error: missing '; 'before the identifier' title '
C:/matcom45/samples/not m (5) : error C2065: 'title: undeclared identifier
C:/matcom45/samples/not m (5) : error C2065: 'TM' : undeclared identifier
C:/matcom45/samples/not m (7) : error C2065: 'call_stack_end: undeclared identifier
C:/matcom45/samples/not m (8) : error C2065: 'exitM: undeclared identifier
An error occurred when executing cl. Exe.

Demo. Exe - 1 error (s), and 0 warning (s)

CodePudding user response:

Call procedure is as follows:
InitM (MATCOM_VERSION);//initialize
Line # 1 "c:/matcom45/samples/not m"
//calculate and draw sinc function waveform
DMm (t1); DMm (y);
# 2 line "c:/matcom45/samples/not m"
Call_stack_begin;
# 2 line "c:/matcom45/samples/not m"
_ t1=colon (5.0, 0.01, 5.0);
# line 3 "c:/matcom45/samples/not m"
_ y=sinc (t1);
# line 4 "c:/matcom45/samples/not m"
_ the plot (CL (t1)));
# line 5 "c:/matcom45/samples/not m"
_ the axis ((BR (5.0), 5.0, 0.5, 1.5));
# 6 line "c:/matcom45/samples/not m"
_ the title (CL (" sinc function ") (TM)));
Call_stack_end;
ExitM ();//end

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!
  • Related