poting Posted January 24, 2018 Report Share Posted January 24, 2018 Hello everyone, I am attempting to use uGFX in my STM32 Project, but I have some problem now. I followed the instructions of uGFX Wiki Getting Started. First, I added "include $(GFXLIB)/gfx.mk" in my makefile and defined "GFX_USE_OS_RAW32" in gfxconf.h as "TRUE". Everything was fine. Then I added "include $(GFXLIB)/src/gos/gos.mk" and "OPT_OS = raw32" in makefile, and something went wrong. The following picture is the output of terminal. I failed to link all objective files, and it tells me "xxx.c:#: multiple definition of `functioin()', xxx.c:#: first defined here". "xxx.c" means the same source file. And this is my arm-none-eabi-ld option : "LDFLAGS = -lnosys -fno-exceptions -fdata-sections" I hope the community could solve my problem. I will be very appreciate for any help. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted January 24, 2018 Report Share Posted January 24, 2018 Hello @poting and welcome to the µGFX community! 35 minutes ago, poting said: First, I added "include $(GFXLIB)/gfx.mk" in my makefile and defined "GFX_USE_OS_RAW32" in gfxconf.h as "TRUE". Everything was fine. That's not only fine but also correct. 35 minutes ago, poting said: Then I added "include $(GFXLIB)/src/gos/gos.mk" and "OPT_OS = raw32" in makefile, and something went wrong. That's wrong - don't do that. You already included everything in the first step. Now you're including some stuff that is included in $(GFXLIB)/gfx.mk again manually. So you have some stuff twice. That's why you get the double definition errors. Link to comment Share on other sites More sharing options...
poting Posted January 25, 2018 Author Report Share Posted January 25, 2018 Thank you for your quick reply! It works! Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted January 25, 2018 Report Share Posted January 25, 2018 Glad to hear that everything is working! Link to comment Share on other sites More sharing options...
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