what’s wrong with winsock2.h , It’s in system path. why can’t link?
-------------- Build: Debug in openocd ---------------
Compiling: src\flash\at91sam7.c
E:\CBProject\openocd\src\flash\at91sam7.c: In function `at91sam7_protect’:
E:\CBProject\openocd\src\flash\at91sam7.c:677: warning: unused variable `status’
Compiling: src\flash\cfi.c
Compiling: src\flash\flash.c
Compiling: src\flash\lpc2000.c
Compiling: src\flash\lpc3180_nand_controller.c
Compiling: src\flash\nand.c
Compiling: src\flash\non_cfi.c
Compiling: src\flash\stellaris.c
E:\CBProject\openocd\src\flash\stellaris.c: In function `stellaris_info’:
E:\CBProject\openocd\src\flash\stellaris.c:187: warning: suggest parentheses around + or - in operand of &
E:\CBProject\openocd\src\flash\stellaris.c:192: warning: suggest parentheses around + or - in operand of &
E:\CBProject\openocd\src\flash\stellaris.c:192: warning: suggest parentheses around + or - in operand of &
E:\CBProject\openocd\src\flash\stellaris.c: In function `stellaris_get_flash_status’:
E:\CBProject\openocd\src\flash\stellaris.c:214: warning: unused variable `stellaris_info’
E:\CBProject\openocd\src\flash\stellaris.c: In function `stellaris_read_clock_info’:
E:\CBProject\openocd\src\flash\stellaris.c:230: warning: unused variable `tmp’
E:\CBProject\openocd\src\flash\stellaris.c: In function `stellaris_flash_command’:
E:\CBProject\openocd\src\flash\stellaris.c:305: warning: unused variable `stellaris_info’
E:\CBProject\openocd\src\flash\stellaris.c: In function `stellaris_read_part_info’:
E:\CBProject\openocd\src\flash\stellaris.c:367: warning: suggest parentheses around + or - in operand of &
E:\CBProject\openocd\src\flash\stellaris.c:368: warning: suggest parentheses around + or - in operand of &
E:\CBProject\openocd\src\flash\stellaris.c: In function `stellaris_erase_check’:
E:\CBProject\openocd\src\flash\stellaris.c:390: warning: unused variable `stellaris_info’
E:\CBProject\openocd\src\flash\stellaris.c:391: warning: unused variable `target’
E:\CBProject\openocd\src\flash\stellaris.c:392: warning: unused variable `i’
E:\CBProject\openocd\src\flash\stellaris.c: In function `stellaris_protect_check’:
E:\CBProject\openocd\src\flash\stellaris.c:404: warning: unused variable `target’
E:\CBProject\openocd\src\flash\stellaris.c: In function `stellaris_protect’:
E:\CBProject\openocd\src\flash\stellaris.c:514: warning: unused variable `cmd’
E:\CBProject\openocd\src\flash\stellaris.c: In function `stellaris_write_block’:
E:\CBProject\openocd\src\flash\stellaris.c:635: warning: unsigned int format, pointer arg (arg 6)
E:\CBProject\openocd\src\flash\stellaris.c:635: warning: unsigned int format, pointer arg (arg 7)
E:\CBProject\openocd\src\flash\stellaris.c:650: warning: unsigned int format, pointer arg (arg 6)
E:\CBProject\openocd\src\flash\stellaris.c:650: warning: unsigned int format, pointer arg (arg 8)
E:\CBProject\openocd\src\flash\stellaris.c:625: warning: unused variable `stellaris_info’
E:\CBProject\openocd\src\flash\stellaris.c: In function `stellaris_write’:
E:\CBProject\openocd\src\flash\stellaris.c:728: warning: unsigned int format, pointer arg (arg 6)
E:\CBProject\openocd\src\flash\stellaris.c:728: warning: unsigned int format, pointer arg (arg 7)
E:\CBProject\openocd\src\flash\stellaris.c:723: warning: unused variable `dst_min_alignment’
E:\CBProject\openocd\src\flash\stellaris.c:723: warning: unused variable `wcount’
E:\CBProject\openocd\src\flash\stellaris.c:723: warning: unused variable `bytes_remaining’
E:\CBProject\openocd\src\flash\stellaris.c:725: warning: unused variable `fcr’
Compiling: src\flash\stm32x.c
Compiling: src\flash\str7x.c
Compiling: src\flash\str9x.c
Compiling: src\flash\str9xpec.c
Compiling: src\helper\binarybuffer.c
Compiling: src\helper\command.c
Compiling: src\helper\configuration.c
Compiling: src\helper\fileio.c
Compiling: src\helper\interpreter.c
Compiling: src\helper\log.c
Compiling: src\helper\replacements.c
Compiling: src\helper\time_support.c
Compiling: src\jtag\amt_jtagaccel.c
Compiling: src\jtag\bitbang.c
Compiling: src\jtag\bitq.c
E:\CBProject\openocd\src\jtag\bitq.c: In function `bitq_in_proc’:
E:\CBProject\openocd\src\jtag\bitq.c:124: warning: suggest parentheses around comparison in operand of &
Compiling: src\jtag\jtag.c
Compiling: src\jtag\parport.c
E:\CBProject\openocd\src\jtag\parport.c: In function `parport_led’:
E:\CBProject\openocd\src\jtag\parport.c:252: warning: unused variable `output’
E:\CBProject\openocd\src\jtag\parport.c: In function `parport_quit’:
E:\CBProject\openocd\src\jtag\parport.c:432: warning: unused variable `output’
Compiling: src\jtag\presto.c
E:\CBProject\openocd\src\jtag\presto.c: In function `presto_write’:
E:\CBProject\openocd\src\jtag\presto.c:142: warning: control reaches end of non-void function
E:\CBProject\openocd\src\jtag\presto.c: In function `presto_open’:
E:\CBProject\openocd\src\jtag\presto.c:383: warning: control reaches end of non-void function
Compiling: src\openocd.c
Compiling: src\pld\pld.c
Compiling: src\pld\virtex2.c
Compiling: src\pld\xilinx_bit.c
Compiling: src\server\gdb_server.c
Compiling: src\server\server.c
Compiling: src\server\telnet_server.c
Compiling: src\target\algorithm.c
Compiling: src\target\arm720t.c
Compiling: src\target\arm7_9_common.c
Compiling: src\target\arm7tdmi.c
Compiling: src\target\arm920t.c
Compiling: src\target\arm926ejs.c
Compiling: src\target\arm966e.c
Compiling: src\target\arm9tdmi.c
Compiling: src\target\arm_disassembler.c
Compiling: src\target\arm_jtag.c
Compiling: src\target\arm_simulator.c
Compiling: src\target\armv4_5.c
Compiling: src\target\armv4_5_cache.c
Compiling: src\target\armv4_5_mmu.c
Compiling: src\target\armv7m.c
E:\CBProject\openocd\src\target\armv7m.c: In function `armv7m_set_core_reg’:
E:\CBProject\openocd\src\target\armv7m.c:210: warning: unused variable `armv7m_target’
E:\CBProject\openocd\src\target\armv7m.c: In function `armv7m_run_algorithm’:
E:\CBProject\openocd\src\target\armv7m.c:436: warning: unused variable `regvalue’
E:\CBProject\openocd\src\target\armv7m.c:450: warning: unused variable `armv7m_core_reg’
E:\CBProject\openocd\src\target\armv7m.c: In function `armv7m_build_reg_cache’:
E:\CBProject\openocd\src\target\armv7m.c:491: warning: unused variable `jtag_info’
E:\CBProject\openocd\src\target\armv7m.c: In function `armv7m_register_commands’:
E:\CBProject\openocd\src\target\armv7m.c:576: warning: unused variable `retval’
Compiling: src\target\breakpoints.c
Compiling: src\target\cortex_m3.c
E:\CBProject\openocd\src\target\cortex_m3.c: In function `cortex_m3_examine_debug_reason’:
E:\CBProject\openocd\src\target\cortex_m3.c:209: warning: unused variable `swjdp’
E:\CBProject\openocd\src\target\cortex_m3.c: In function `cortex_m3_debug_entry’:
E:\CBProject\openocd\src\target\cortex_m3.c:286: warning: unused variable `irq_is_pending’
E:\CBProject\openocd\src\target\cortex_m3.c: In function `cortex_m3_restore_context’:
E:\CBProject\openocd\src\target\cortex_m3.c:354: warning: unused variable `cortex_m3’
E:\CBProject\openocd\src\target\cortex_m3.c: In function `cortex_m3_init_target’:
E:\CBProject\openocd\src\target\cortex_m3.c:1272: warning: unused variable `did1’
E:\CBProject\openocd\src\target\cortex_m3.c:1272: warning: unused variable `dc0’
E:\CBProject\openocd\src\target\cortex_m3.c: In function `cortex_m3_init_arch_info’:
E:\CBProject\openocd\src\target\cortex_m3.c:1336: warning: unused variable `jtag_info’
Compiling: src\target\cortex_swjdp.c
E:\CBProject\openocd\src\target\cortex_swjdp.c: In function `ahbap_block_read_u32’:
E:\CBProject\openocd\src\target\cortex_swjdp.c:576: warning: unused variable `blockmax’
Compiling: src\target\embeddedice.c
Compiling: src\target\etb.c
Compiling: src\target\etm.c
Compiling: src\target\etm_dummy.c
Compiling: src\target\image.c
Compiling: src\target\register.c
Compiling: src\target\target.c
E:\CBProject\openocd\src\target\target.c: In function `target_register_user_commands’:
E:\CBProject\openocd\src\target\target.c:888: warning: implicit declaration of function `trace_register_commands’
Compiling: src\target\target_request.c
Compiling: src\target\trace.c
Compiling: src\xsvf\xsvf.c
Linking console executable: bin\Debug\openocd.exe
obj\Debug\src\server\gdb_server.o: In function `gdb_get_char’:
E:/CBProject/openocd/src/server/gdb_server.c:93: undefined reference to `WSAGetLastError@0’
obj\Debug\src\server\gdb_server.o: In function `read_socket’:
E:/CBProject/openocd/src/helper/replacements.h:133: undefined reference to `recv@16’
obj\Debug\src\server\gdb_server.o: In function `write_socket’:
E:/CBProject/openocd/src/helper/replacements.h:124: undefined reference to `send@16’
obj\Debug\src\server\server.o: In function `add_connection’:
E:/CBProject/openocd/src/server/server.c:63: undefined reference to `accept@12’
obj\Debug\src\server\server.o: In function `close_socket’:
E:/CBProject/openocd/src/helper/replacements.h:142: undefined reference to `closesocket@4’
obj\Debug\src\server\server.o: In function `add_service’:
E:/CBProject/openocd/src/server/server.c:142: undefined reference to `socket@12’
E:/CBProject/openocd/src/server/server.c:148: undefined reference to `setsockopt@20’
E:/CBProject/openocd/src/server/server.c:155: undefined reference to `htons@4’
E:/CBProject/openocd/src/server/server.c:157: undefined reference to `bind@12’
E:/CBProject/openocd/src/server/server.c:163: undefined reference to `listen@8’
obj\Debug\src\server\server.o: In function `socket_nonblock’:
E:/CBProject/openocd/src/helper/replacements.h:152: undefined reference to `ioctlsocket@12’
obj\Debug\src\server\server.o: In function `server_loop’:
E:/CBProject/openocd/src/server/server.c:294: undefined reference to `select@20’
E:/CBProject/openocd/src/server/server.c:298: undefined reference to `WSAGetLastError@0’
E:/CBProject/openocd/src/server/server.c:331: undefined reference to `__WSAFDIsSet@8’
E:/CBProject/openocd/src/server/server.c:341: undefined reference to `accept@12’
E:/CBProject/openocd/src/server/server.c:354: undefined reference to `__WSAFDIsSet@8’
obj\Debug\src\server\server.o: In function `server_init’:
E:/CBProject/openocd/src/server/server.c:411: undefined reference to `WSAStartup@8’
obj\Debug\src\server\server.o: In function `server_quit’:
E:/CBProject/openocd/src/server/server.c:434: undefined reference to `WSACleanup@0’
obj\Debug\src\server\telnet_server.o: In function `write_socket’:
E:/CBProject/openocd/src/helper/replacements.h:124: undefined reference to `send@16’
obj\Debug\src\server\telnet_server.o: In function `read_socket’:
E:/CBProject/openocd/src/helper/replacements.h:133: undefined reference to `recv@16’
obj\Debug\src\target\target.o: In function `target_buffer_get_u32’:
E:/CBProject/openocd/src/target/target.c:135: undefined reference to `xscale_target’
collect2: ld returned 1 exit status
Process terminated with status 1 (2 minutes, 33 seconds)
21 errors, 43 warnings