I am currently getting the following error:
libtool: link: gcc -std=gnu99 -Wall -Wstrict-prototypes -Wformat-
security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast
-Wcast-align -Wredundant-decls -Werror -o src/openocd src/main.o
src/.libs/libopenocd.a ./jimtcl/libjim.a -ldl
src/.libs/libopenocd.a(mips32.o): In function
`mips32_checksum_memory':
mips32.c:(.text+0x20fd): undefined reference to `pracc_swap16_array'
src/.libs/libopenocd.a(mips32.o): In function
`mips32_blank_check_memory':
mips32.c:(.text+0x2490): undefined reference to `pracc_swap16_array'
src/.libs/libopenocd.a(mips32_pracc.o): In function
`mips32_pracc_clean_text_jump':
mips32_pracc.c:(.text+0x269): undefined reference to
`pracc_swap16_array'
src/.libs/libopenocd.a(mips32_pracc.o): In function
`mips32_pracc_fastdata_xfer':
mips32_pracc.c:(.text+0x2f2c): undefined reference to
`pracc_swap16_array'
mips32_pracc.c:(.text+0x3099): undefined reference to
`pracc_swap16_array'
collect2: ld returned 1 exit status
I’m assuming there is something silly I have wrong?
The failing symbols are declared inline in a header file; and inline
functions in header files are scary, since different versions of the C
standard have different rules about them in if you want the compiler to
able to choose about inline them or not (in your compilation, the
compiler has chosen not to inline them, and the linker is unable to find
a non-inline version of the function, since there is not created one).
http://www.greenend.org.uk/rjk/tech/inline.html
currently the code has almost done strategy 3, but missing one "extern"
in a .c file. Easiest and most common is strategy 1, adding the static
keyword.
--
Stian Skjelstad
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel