> Here is my error
>
>     /bin/bash ../libtool --tag=CC   --mode=link gcc -std=gnu99  -g -O2
>     -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra
>     -Wno-unused-parameter -Wbad-function-cast -Wcast-align
>     -Wredundant-decls   -o openocd main.o libopenocd.la
>     ../jimtcl/libjim.a   -ldl
>     libtool: link: gcc -std=gnu99 -g -O2 -Wall -Wstrict-prototypes
>     -Wformat-security -Wshadow -Wextra -Wno-unused-parameter
>     -Wbad-function-cast -Wcast-align -Wredundant-decls -o openocd
>     main.o  ./.libs/libopenocd.a -lpthread -lrt ../jimtcl/libjim.a -ldl
>     ./.libs/libopenocd.a(libhelper_la-options.o): In function `port_flag':
>     /home/vivien/Desktop/openocdcopie/src/helper/options.c:130:
>     undefined reference to `usbinit'

This is a linking problem. Compiled code references a symbol that is not
present when linking. (What would happen if you forget to link in an .o
file for instance.).

Automake, autoconf etc. can sometimes be a bit tricky. But in general they
end up wrapping gcc.

What I would do.

Which .c file is "usbinit" defined in.

Is that .c file compiled to an .o file? (You can always try to add
#error Some dummy text
into the .c file. If compile fails, it what compiled before.

Is the .o file linked into the .a/.la file?

Is the .a/.la file linked into the final target?


Stian Skjelstad


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to