tubbutec Posted May 30, 2016 Report Posted May 30, 2016 Hi, I am trying to build ugfx on Win7 (64bit) and followed the guide in the wiki:http://wiki.ugfx.org/index.php/Your_First_Compile_-_Windows Could not find the exact packages mentioned in the wiki (I guess they are called differently now). The gcc version closest to the one mentioned in the makefile I could download using the installer was i686-w64-mingw32-gcc instead of i686-pc-mingw32-gcc changed the makefile accordingly. The code builds, but the linker shows the following error: Linking .build/testProject.exe /cygdrive/c/Users/280grad/AppData/Local/Temp/cckDx1MV.ltrans0.ltrans.o:cckDx1MV.ltrans0.o:(.text+0x2380): 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-4.0.6-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-4.0.6-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 I tried both the 32bit and 64bit version of cygwin, but with the same result. Any help would be very much apprechiated Thanks a lot
tubbutec Posted May 30, 2016 Author Report Posted May 30, 2016 Just realized there is a fully working cygwin toolchain coming with ugfx-studio - used it and it works. Leaving this thread here for reference..
Joel Bodenmann Posted May 31, 2016 Report Posted May 31, 2016 Glad to hear that you got it working using the toolchain that came with µGFX-Studio! We will have a look at this and update the documentation accordingly to match the new package names in case of they changed. However, this might take a week or two. Sorry for the delay!
bluexp Posted June 4, 2016 Report Posted June 4, 2016 I have this same problem and I couldn't use provided toolchain because it is a win64 application and I am running win xp: Linking .build/TestProject.exe /cygdrive/c/DOCUME~1/bluexp/LOCALS~1/Temp/cc4tuJ82.ltrans0.ltrans.o:cc4tuJ82.lt rans0.o:(.text+0x2380): 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-4.0.6-1/crt/crt0_c.c:17: first def ined 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-4.0.6-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.e xe] Error 1
Joel Bodenmann Posted June 4, 2016 Report Posted June 4, 2016 Hello bluexp and welcome to the community! I'm sorry but we don't provide any support for Windows XP. We recommend that you simply use the µGFX-Studio on a different machine or that you run it in a VM.
bluexp Posted June 4, 2016 Report Posted June 4, 2016 But the problem above does not related to win XP, I tried on another PC with Windwos 7 (32bit) and the result is the same: Linking .build/TestProject.exe /cygdrive/c/Users/bluexp/AppData/Local/Temp/ccJJHHFz.ltrans0.ltrans.o:ccJJHHFz. ltrans0.o:(.text+0x2380): 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-4.0.6-1/crt/crt0_c.c:17: first def ined 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-4.0.6-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.e xe] Error 1
inmarket Posted June 5, 2016 Report Posted June 5, 2016 Studio is cuurently 64bit only. The compilers/toolchains are available from multiple sources in both 32bit and 64bit versions. The pc vs w32 change seems to be a cygwin difference between the eabi and the elf versions or in this case the toolchain for compiling windows programs versus those to compile command line programs hence it complaining about main(). We will look at updating the wiki when we have had a chance to test it with a new version of cygwin.
Joel Bodenmann Posted June 5, 2016 Report Posted June 5, 2016 Note that you can use a different Cygwin / MinGW version that runs on your system. All you have to do is setting up a corresponding build configuration under Preferences -> Build.
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