Expected Program

I am trying to compile a program written in c using the expect.h header. I try this:

cc -I/usr/include main.c -lexpect -ltcl
cc -I/usr/include main.c

I tried the same with gcc, but to no avail.

I get this:

undefined reference to `exp_spawnl'
undefined reference to `exp_expectl'

Any ideas?

Thank,

Walter

+3
source share
2 answers

This means that no matter what you thought was used, the wait library used does not contain these two functions. Thus, you need to track which of the pending libraries will be loaded, and then check if the functions are in it (they are not, but you have to check to determine what is defined).

, , nm -g libexpect.so, . , exp_spawnl exp_expectl .

, , , ..

, , , .

+1

/usr/include?

, undefined , . ​​?

-L/path/to/lib -lexpect

0

Source: https://habr.com/ru/post/1781904/


All Articles