RichStrong / STLINK-V3SET-I2C-TEST

STLINK-V3SET I2C APIs Demo
7 stars 3 forks source link

compiler in window platform #2

Open dafeng0908 opened 4 years ago

dafeng0908 commented 4 years ago

i modify makefile stlinklib.so to stlinklib.dll and use MinGW to bulid code for windows.

it show "collect2.exe: error: ld returned 1 exit status"

g++ -o DEMO_IIC main_example.o bridge.o criticalsectionlock.o stlink_device.o stlink_interface.o ErrLog.o lib/libSTLinkUSBDriver.dll -Wall -g -Ibridge -Icommon -Ierror c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: stlink_interface.o: in function ZN15STLinkInterface17LoadStlinkLibraryEPKc': C:\MinGW\STLINK_I2C/common/stlink_interface.cpp:167: undefined reference to_imp__PathAppendA@8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(main.o):(.text.startup+0xc0): undefined reference to `WinMain@16' collect2.exe: error: ld returned 1 exit status Makefile:12: recipe for target 'DEMO_IIC' failed make: *** [DEMO_IIC] Error 1