Menu

can't run the examples

nico
2017-09-11
2017-09-28
  • nico

    nico - 2017-09-11

    Hello,
    I can't run the matlab examples. i get this error message in matlab.

    startMPC
    Building probfct ...
    Building with 'Microsoft Windows SDK 7.1 (C)'.
    MEX completed successfully.
    Building grampc_init_Cmex ...
    Building with 'Microsoft Windows SDK 7.1 (C)'.
    grampc_init_Cmex: Error during building process.
    Error using mex
    Creating library C:\N_Pecher\grampc\matlab\examples\Quadrotor\grampc_init_Cmex.lib and object
    C:\N_Pecher\grampc\matlab\examples\Quadrotor\grampc_init_Cmex.exp
    grampc_run.obj : error LNK2019: unresolved external symbol isfinite referenced in function
    intCostTrapezodial
    C:\N_Pecher\grampc\matlab\examples\Quadrotor\grampc_init_Cmex.mexw64 : fatal error LNK1120: 1
    unresolved externals

    please tell me what to do. Thank you!

     
  • Tobias Englert

    Tobias Englert - 2017-09-11

    Hello,
    your compiler does not support the macro isfinite. However, in most cases this if-condition (line 658 in grampc_run.c) can be removed. Therefore, try to delete this statement and recompile the toolbox.

    Best regards

     
  • Tobias Englert

    Tobias Englert - 2017-09-11

    I also removed this macro in the master branch.

    Best regards

     
  • nico

    nico - 2017-09-11

    It worked. Thank you very much!

     
  • WBNunes

    WBNunes - 2017-09-22

    Hello Nico and Tobias Englert,
    I too can't run the matlab examples. In my case, I get this error message in matlab:

    >> startMPC
    Undefined function or variable 'grampc_init_Cmex'.

    Error in startMPC (line 70)
    grampc = grampc_init_Cmex();

    Please tell me what to do!

     

    Last edit: WBNunes 2017-09-22
  • Tobias Englert

    Tobias Englert - 2017-09-25

    Hello,

    you must compile the probfct file during the first run and after every change. To do this, set the compile flag (line 35) to 1.

    With best regards

     
  • WBNunes

    WBNunes - 2017-09-25

    Thank you Tobias, I already saw a progress but a new error appeared:

    >> startMPC
    Building probfct ...
    Building with 'Microsoft Windows SDK 7.1 (C)'.
    MEX completed successfully.
    Building grampc_init_Cmex ...
    Building with 'Microsoft Windows SDK 7.1 (C)'.
    grampc_init_Cmex: Error during building process.
    Error using mex
    Creating library C:\Program Files\MATLAB\grampc_v1.1\matlab\examples\Crane_2D\grampc_init_Cmex.lib and object
    C:\Program Files\MATLAB\grampc_v1.1\matlab\examples\Crane_2D\grampc_init_Cmex.exp
    grampc_run.obj : error LNK2019: unresolved external symbol isfinite referenced in function intCostTrapezodial
    C:\Program Files\MATLAB\grampc_v1.1\matlab\examples\Crane_2D\grampc_init_Cmex.mexw64 : fatal error LNK1120: 1
    unresolved externals

    Error in make (line 145)
    eval(['mex -output ',EXE{i},' ',BINPATH,'/',EXE{i},'.',OBJEXT,OBJ,' probfct.',OBJEXT,'
    -I',CHEADERPATH,VERBOSE,DEBUG]
    );

    Error in startMPC (line 64)
    make(PROBFCT);

     
  • WBNunes

    WBNunes - 2017-09-25
     

    Last edit: WBNunes 2017-09-25
  • Tobias Englert

    Tobias Englert - 2017-09-26

    You will find the answer in my first two contributions to this discussion.

     
  • WBNunes

    WBNunes - 2017-09-28

    Tobias, I still can't. I opened the file "grampc_v1.1\src\grampc_run.c and modified the line 658 (as suggested in the forum). How should I proceed about "removed this macro in the master branch"? I didn't understand about this.

    Please tell me what to do it any other way!

    Best regards

     
  • WBNunes

    WBNunes - 2017-09-28

    Printscreen about contributions in grampc_run.c. Is it correct? Image

    I still can not make it run the matlab example

     

    Last edit: WBNunes 2017-09-28
  • Tobias Englert

    Tobias Englert - 2017-09-28

    "master branch" refers to the main git branch. If you download or checkout the current version of grampc, the macro will not be included because it was removed by me. I'm sorry, but I'm not going to open any link, so i can't see your image, however, as mentioned before you can download the current version and everything should be fine.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.