How is compiling a C code in matlab?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am using ASAMIN package, a matlab gateway for ASA (adaptive simulated annealing).
ASAMIN and ASA Packages are available in http://ssakata.sdf.org/software/ and http://ingber.com, respectively.
Based on The manual, I made following code in command line:
>> mex asamin.c asa.c -DUSER_ACCEPTANCE_TEST -DUSER_ASA_OUT -DDBL_MIN=2.2250738585072014e-308
Matlab return me following error. Please find the issue.
>> mex asamin.c asa.c -DUSER_ACCEPTANCE_TEST -DUSER_ASA_OUT -DDBL_MIN=2.2250738585072014e-308
Building with 'MinGW64 Compiler (C)'.
E:\asamin\asamin.c: In function 'mexFunction':
E:\asamin\asamin.c:467:39: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
USER_ASA_OPTIONS->Acceptance_Test = user_acceptance_test;
^
E:\asamin\asamin.c:935:33: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
matlab_cost_func_prhs[1 + i] = prhs[6 + i];
^
E:\asamin\asamin.c:955:33: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
matlab_cost_func_prhs[3 + i] = prhs[6 + i];
^
Error using mex
E:\asamin\asa.c: In function 'accept_new_state':
E:\asamin\asa.c:4503:12: error: 'USER_DEFINES {aka struct <anonymous>}' has no member named 'Acceptance_Fit'
OPTIONS->Acceptance_Fit (current_generated_state->cost,
^
E:\asamin\asa.c: In function 'asa_test_asa_options':
E:\asamin\asa.c:6491:14: error: 'USER_DEFINES {aka struct <anonymous>}' has no member named 'Acceptance_Fit'
if (OPTIONS->Acceptance_Fit == NULL) {
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Support for MinGW-w64 C/C++ Compiler finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!