0

I'm trying to use ACADO to solve a NMPC problem. I downloaded the package and followed this tutorial (http://acado.github.io/using_cmake_unix_common.html) to create my own project.

I was able to compile my project (cmake .. make) and generated my test.c file which should be able to solve my problem. But when I run gcc test.c I got the following error :

/tmp/ccWIC7Lx.o: Na função "main":

test.c:(.text+0x1d):undefined reference to "acado_initializeSolver"
test.c:(.text+0x12f): undefined reference to "acado_printHeader"
test.c:(.text+0x139): undefined reference to "acado_preparationStep"
test.c:(.text+0x145): undefined reference to "acado_tic"
test.c:(.text+0x158): undefined reference to "acado_feedbackStep"
test.c:(.text+0x162): undefined reference to "acado_getKKT"
test.c:(.text+0x182): undefined reference to "acado_preparationStep"
test.c:(.text+0x198): undefined reference to "acado_toc"
test.c:(.text+0x1b7): undefined reference to "acado_printDifferentialVariables"
test.c:(.text+0x1c1): undefined reference to "acado_printControlVariables"
collect2: error: ld returned 1 exit status 

I have no idea what is causing this error. I also tried to run a test.c file located in ACADO example folder (ACADOtoolkit/examples/code_generation/mpc_mhe/crane_kul_mhe_export) which gave me the same issues.

I need some advices since I don't know what I'm doing wrong.

Thanks for your help!

0 Answers0