usb audio参考代码里自带的dfu host for macos编译出错

技术交流
Cirnono9
Newbie
Posts: 1
Joined: Tue Apr 23, 2019 7:20 pm

usb audio参考代码里自带的dfu host for macos编译出错

Postby Cirnono9 » Tue Apr 23, 2019 7:27 pm

从官网下到的参考代码里的dfu host代码,直接在macOS下用user guide 里的make命令无法正常编译,会有多个报错,求大佬指点


zhouzhibindeMacBook-Pro:downloads zhouzhibin$ cd sw_usb_audio-\[sw\]_6/sc_usb_audio/module_dfu/host/xmos_dfu_osx/
zhouzhibindeMacBook-Pro:xmos_dfu_osx zhouzhibin$ make -f Makefile.OSX all
g++ -g -o xmosdfu xmosdfu.cpp -I. -IOSX libusb-1.0.0.dylib -m32
xmosdfu.cpp:116:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
xmosdfu.cpp:120:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
xmosdfu.cpp:124:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
xmosdfu.cpp:128:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
xmosdfu.cpp:276:1: warning: control may reach end of non-void function
[-Wreturn-type]
}
^
xmosdfu.cpp:447:3: warning: bool literal returned from 'main' [-Wmain]
return true;
^ ~~~~
6 warnings generated.
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libc++.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libc++.tbd
Undefined symbols for architecture i386:
"___stack_chk_fail", referenced from:
dfu_getStatus(unsigned int, unsigned char*, unsigned int*, unsigned char*, unsigned char*) in xmosdfu-7a6a55.o
write_dfu_image(char*) in xmosdfu-7a6a55.o
read_dfu_image(char*) in xmosdfu-7a6a55.o
"___stack_chk_guard", referenced from:
dfu_getStatus(unsigned int, unsigned char*, unsigned int*, unsigned char*, unsigned char*) in xmosdfu-7a6a55.o
write_dfu_image(char*) in xmosdfu-7a6a55.o
read_dfu_image(char*) in xmosdfu-7a6a55.o
"___stderrp", referenced from:
write_dfu_image(char*) in xmosdfu-7a6a55.o
read_dfu_image(char*) in xmosdfu-7a6a55.o
_main in xmosdfu-7a6a55.o
"_fclose", referenced from:
read_dfu_image(char*) in xmosdfu-7a6a55.o
"_fopen$UNIX2003", referenced from:
write_dfu_image(char*) in xmosdfu-7a6a55.o
read_dfu_image(char*) in xmosdfu-7a6a55.o
"_fprintf", referenced from:
write_dfu_image(char*) in xmosdfu-7a6a55.o
read_dfu_image(char*) in xmosdfu-7a6a55.o
_main in xmosdfu-7a6a55.o
"_fread", referenced from:
write_dfu_image(char*) in xmosdfu-7a6a55.o
"_fseek", referenced from:
write_dfu_image(char*) in xmosdfu-7a6a55.o
"_ftell", referenced from:
write_dfu_image(char*) in xmosdfu-7a6a55.o
"_fwrite$UNIX2003", referenced from:
read_dfu_image(char*) in xmosdfu-7a6a55.o
"_memset", referenced from:
write_dfu_image(char*) in xmosdfu-7a6a55.o
"_printf", referenced from:
xmos_dfu_save_state(unsigned int) in xmosdfu-7a6a55.o
xmos_dfu_restore_state(unsigned int) in xmosdfu-7a6a55.o
write_dfu_image(char*) in xmosdfu-7a6a55.o
read_dfu_image(char*) in xmosdfu-7a6a55.o
_main in xmosdfu-7a6a55.o
find_xmos_device(unsigned int, unsigned int) in xmosdfu-7a6a55.o
"_strcmp", referenced from:
_main in xmosdfu-7a6a55.o
"_system$UNIX2003", referenced from:
_main in xmosdfu-7a6a55.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [all] Error 1
zhouzhibindeMacBook-Pro:xmos_dfu_osx zhouzhibin$

Who is online

Users browsing this forum: No registered users and 1 guest