servodude Posted May 1, 2017 Report Posted May 1, 2017 Hi I am trying to kick of my first build in windows and getting complaints using Cygwin64. I can build the initial testProject described in your wiki if I use the cygwin toolchain that ships with Studio 0.15. However if I try and build using Cygwin64 I get the following error at linking. (I modified the Makefile to find the 64bit versions of gcc (i686-w64... vs i686-pc- ) ) C:\dev\uGFX\test\testProject>make . C Compiler Options.... i686-w64-mingw32-gcc -c -ggdb -O0 -m32 -fomit-frame-pointer -Wall -Wextra -Wstrict-prototypes -fverbose-asm -ffunction-sections -fdata-sections -fno-common -flto -MMD -MP -MF .build/dep/fakefile.o.d -I. -I../uGFX -I../uGFX/3rdparty/tinygl-0.4-ugfx/include -I../uGFX/drivers/multiple/Win32 -I../uGFX/drivers/gaudio/Win32 -I../uGFX/demos/modules/gdisp/basics -DGFX_USE_OS_WIN32=TRUE fakefile.c -o .build/obj/fakefile.o . Linker Options........ i686-w64-mingw32-gcc -m32 -Wl,--gc-sections -lgdi32 -lwinmm .build/obj/fakefile.o -o .build/testProject.exe . Compiling ../uGFX/src/gfx.c Compiling ../uGFX/src/gos/gos_chibios.c Compiling ../uGFX/src/gos/gos_freertos.c Compiling ../uGFX/src/gos/gos_win32.c Compiling ../uGFX/src/gos/gos_linux.c Compiling ../uGFX/src/gos/gos_osx.c Compiling ../uGFX/src/gos/gos_raw32.c Compiling ../uGFX/src/gos/gos_ecos.c Compiling ../uGFX/src/gos/gos_rawrtos.c Compiling ../uGFX/src/gos/gos_arduino.c Compiling ../uGFX/src/gos/gos_cmsis.c Compiling ../uGFX/src/gos/gos_nios.c Compiling ../uGFX/src/gos/gos_x_threads.c Compiling ../uGFX/src/gos/gos_x_heap.c Compiling ../uGFX/src/gdriver/gdriver.c Compiling ../uGFX/src/gqueue/gqueue.c Compiling ../uGFX/src/gdisp/gdisp.c Compiling ../uGFX/src/gdisp/gdisp_fonts.c Compiling ../uGFX/src/gdisp/gdisp_pixmap.c Compiling ../uGFX/src/gdisp/gdisp_image.c Compiling ../uGFX/src/gdisp/gdisp_image_native.c Compiling ../uGFX/src/gdisp/gdisp_image_gif.c Compiling ../uGFX/src/gdisp/gdisp_image_bmp.c Compiling ../uGFX/src/gdisp/gdisp_image_jpg.c Compiling ../uGFX/src/gdisp/gdisp_image_png.c Compiling ../uGFX/src/gdisp/mcufont/mf_encoding.c Compiling ../uGFX/src/gdisp/mcufont/mf_font.c Compiling ../uGFX/src/gdisp/mcufont/mf_justify.c Compiling ../uGFX/src/gdisp/mcufont/mf_kerning.c Compiling ../uGFX/src/gdisp/mcufont/mf_rlefont.c Compiling ../uGFX/src/gdisp/mcufont/mf_bwfont.c Compiling ../uGFX/src/gdisp/mcufont/mf_scaledfont.c Compiling ../uGFX/src/gdisp/mcufont/mf_wordwrap.c Compiling ../uGFX/src/gevent/gevent.c Compiling ../uGFX/src/gtimer/gtimer.c Compiling ../uGFX/src/gwin/gwin.c Compiling ../uGFX/src/gwin/gwin_widget.c Compiling ../uGFX/src/gwin/gwin_wm.c Compiling ../uGFX/src/gwin/gwin_console.c Compiling ../uGFX/src/gwin/gwin_graph.c Compiling ../uGFX/src/gwin/gwin_button.c Compiling ../uGFX/src/gwin/gwin_slider.c Compiling ../uGFX/src/gwin/gwin_checkbox.c Compiling ../uGFX/src/gwin/gwin_image.c Compiling ../uGFX/src/gwin/gwin_label.c Compiling ../uGFX/src/gwin/gwin_radio.c Compiling ../uGFX/src/gwin/gwin_list.c Compiling ../uGFX/src/gwin/gwin_progressbar.c Compiling ../uGFX/src/gwin/gwin_container.c Compiling ../uGFX/src/gwin/gwin_frame.c Compiling ../uGFX/src/gwin/gwin_tabset.c Compiling ../uGFX/src/gwin/gwin_gl3d.c Compiling ../uGFX/src/gwin/gwin_keyboard.c Compiling ../uGFX/src/gwin/gwin_keyboard_layout.c Compiling ../uGFX/src/gwin/gwin_textedit.c Compiling ../uGFX/src/ginput/ginput.c Compiling ../uGFX/src/ginput/ginput_mouse.c Compiling ../uGFX/src/ginput/ginput_keyboard.c Compiling ../uGFX/src/ginput/ginput_keyboard_microcode.c Compiling ../uGFX/src/ginput/ginput_toggle.c Compiling ../uGFX/src/ginput/ginput_dial.c Compiling ../uGFX/src/gadc/gadc.c Compiling ../uGFX/src/gaudio/gaudio.c Compiling ../uGFX/src/gmisc/gmisc.c Compiling ../uGFX/src/gmisc/gmisc_arrayops.c Compiling ../uGFX/src/gmisc/gmisc_matrix2d.c Compiling ../uGFX/src/gmisc/gmisc_trig.c Compiling ../uGFX/src/gfile/gfile.c Compiling ../uGFX/src/gfile/gfile_fs_native.c Compiling ../uGFX/src/gfile/gfile_fs_ram.c Compiling ../uGFX/src/gfile/gfile_fs_rom.c Compiling ../uGFX/src/gfile/gfile_fs_fatfs.c Compiling ../uGFX/src/gfile/gfile_fs_petitfs.c Compiling ../uGFX/src/gfile/gfile_fs_mem.c Compiling ../uGFX/src/gfile/gfile_fs_chibios.c Compiling ../uGFX/src/gfile/gfile_fs_strings.c Compiling ../uGFX/src/gfile/gfile_printg.c Compiling ../uGFX/src/gfile/gfile_scang.c Compiling ../uGFX/src/gfile/gfile_stdio.c Compiling ../uGFX/src/gfile/gfile_fatfs_wrapper.c Compiling ../uGFX/src/gfile/gfile_fatfs_diskio_chibios.c Compiling ../uGFX/src/gfile/gfile_petitfs_wrapper.c Compiling ../uGFX/src/gfile/gfile_petitfs_diskio_chibios.c Compiling ../uGFX/src/gtrans/gtrans.c Compiling ../uGFX/drivers/multiple/Win32/gdisp_lld_Win32.c Compiling ../uGFX/drivers/gaudio/Win32/gaudio_record_Win32.c Compiling ../uGFX/drivers/gaudio/Win32/gaudio_play_Win32.c Compiling ../uGFX/demos/modules/gdisp/basics/main.c Linking .build/testProject.exe /cygdrive/c/Users/Richard/AppData/Local/Temp/ccYMKe33.ltrans0.ltrans.o:<artificial>:(.text+0x2725): multiple definition of `main' /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):/usr/src/debug/mingw64-i686-runtime-5.0.2-1/crt/crt0_c.c:17: first defined here /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o): In function `main': /usr/src/debug/mingw64-i686-runtime-5.0.2-1/crt/crt0_c.c:18: undefined reference to `WinMain@16' collect2: error: ld returned 1 exit status make: *** [../uGFX/tools/gmake_scripts/compiler_gcc.mk:284: .build/testProject.exe] Error 1 C:\dev\uGFX\test\testProject> Have you any suggestions for what might be the problem here? I like to keep cygwin on my default path and I don't think it will play nicely if there are two different copies on there. Thanks for any help. All the best, sd
inmarket Posted May 2, 2017 Report Posted May 2, 2017 You need to use the i686-pc compiler not the i686-w64 compiler. The difference is the startup files and the "Windows console mode" the two compilers use. Unfortunately I have not been able to find a way to overcome the differences. The i686-pc compiler is available in cygwin64 too as that is the one I use all the time.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now