zhuantou215 Posted November 12, 2017 Report Share Posted November 12, 2017 I just learned ugfx, and I want to do some pictures now. But I'm not going to use the code blocks IDE. I hope you can help me. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted November 12, 2017 Report Share Posted November 12, 2017 Hello and welcome to the µGFX community! You can use the µGFX library with any IDE. There's a generic guide here: https://wiki.ugfx.io/index.php/Getting_Started#Integrate_uGFX and there are more IDE specific guides listed on the front page: https://wiki.ugfx.io/index.php/Main_Page Link to comment Share on other sites More sharing options...
zhuantou215 Posted November 13, 2017 Author Report Share Posted November 13, 2017 Sorry, I still can't do it. Because I'm not familiar with the code:blocks software. Can you say more details? Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted November 14, 2017 Report Share Posted November 14, 2017 I'm sorry, this is not a code::blocks support forum. Link to comment Share on other sites More sharing options...
zhuantou215 Posted December 3, 2017 Author Report Share Posted December 3, 2017 How to set GFXLIB?I still don't understand it a little. Link to comment Share on other sites More sharing options...
Oshel Posted December 30, 2017 Report Share Posted December 30, 2017 Hello. Sorry for digging out old topic but I do not want to open new one. I followed your guidelines about compiling uGFX projects under Windows. It went smoothly. Now I would like to set up project under latest version of Code::Blocks, but I do have some problems with it. I haven't found any topic or instructions how to do that- I know that you are not Code::Blocks support, but maybe you can write down the instructions so we, users, can have fun with win32 emulator. First of all I have created an empty project in the directory which the "Your First Compile - Windows" tutorial was using. I have created the folder right next to "TestProject". I copied the makefile to that directory. In the codeblocks project I added "main.c" and "gfxconf.h" files from some demo. After that I entered project properties and I picked "This is custom Makefile" box. Next thing I did is changing the compiler: Settings-> Compiler -> Selected Compiler: Cygwin GCC. After that I switched the tab to "Toolchain executables" and I changed the directory to "C:\cygwin64". Aaaand here I have problem. Which compilers from the "bin" directory should I use? How to fill other boxes like "C++ compiler", "Linker for dynamic libs", "Linker for static libs", "Debugger", "Resource compiler" and "Make program"? And should I do some additional steps? Couse I am messing around with these exes files but I still get compiler executables errors. Thank you in advance for a help and happy new 2018 year! Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted December 31, 2017 Report Share Posted December 31, 2017 @cpu20 can I leave this to you? Regarding the compiler: You'd use the same compiler you use to compile outside of Code::Blocks. Don't forget that Code::Blocks is basically just a text editor on steroids. It doesn't have an integrated compiler or stuff like that. You can set it up to use the compiler you installed in/with cygwin. The same applies to the make utility and all the other stuff. Just point Code::Blocks to the applications in C:\cygwin64\bin. Link to comment Share on other sites More sharing options...
Oshel Posted January 2, 2018 Report Share Posted January 2, 2018 Hello Joel, I do know about the concept of IDE. Some time ago I was writing the code for SDCC in CodeBlocks and it was working fine. I am only having problems with cygwin this time. I tried to point directories and the same execs but with no effect. Let's wait to see what cpu20 have to say I would be happy to see the working settings Link to comment Share on other sites More sharing options...
Oshel Posted January 2, 2018 Report Share Posted January 2, 2018 (edited) Well, I figured what have I been doing wrong- I was changing the global compiler setting instead of project settings... I changed the execs as follows (Settings->Compiler->Toolchain executables) on the picture. After that I changed the build options (righ mouse click on project->Build options-> change compiler on cygwin). Last thing is to change the makefile options (right mouse click on project->Properties->This is custom Makefile). And voila! It works! EDIT: Is there a way in CodeBlocks to include ugfx not in makefile but in search directories? I am missing the functions' names complementary. EDIT: Nvm. - I just included "#include "../uGFX/gfx.h" instead of "#include "gfx.h" Edited January 2, 2018 by Oshel Link to comment Share on other sites More sharing options...
zhuantou215 Posted January 2, 2018 Author Report Share Posted January 2, 2018 Have you compiled it? Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted January 2, 2018 Report Share Posted January 2, 2018 Great work! Glad to hear that you managed to get it working! 30 minutes ago, Oshel said: Is there a way in CodeBlocks to include ugfx not in makefile but in search directories? I am missing the functions' names complementary. You can use the single-file-inclusion mechanism. Alternatively, some IDEs (and I assume that Code::Blocks is one of those) allows to setup additional directory/file paths for external libraries in the per-project settings. But I never used Code::Blocks so I'm not sure. In general, using the makefile approach is better than the single-file-inclusion approach as two features don't work with the single file stuff as documented in the wiki. Link to comment Share on other sites More sharing options...
cpu20 Posted January 2, 2018 Report Share Posted January 2, 2018 I haven't used Code::Blocks yet, but I will look into it when I got the time. A bit late to the party as you already got it figured out As @Joel Bodenmann said the Makefile approach is the most simple and versatile one. If Code::Blocks can make it's own Makefiles it should be able to use the single file inclusion mechanism but it will be more difficult to set up. Link to comment Share on other sites More sharing options...
cpu20 Posted January 2, 2018 Report Share Posted January 2, 2018 I've played around with Code::Blocks a bit and got it to successfully compile a project for an STM32 target using single file inclusion. But the build process is fairly complex as you have to set all the compiler and linker flags manually. There is a plugin that does this for you but it's €10 - €20 as it is a third party plugin. I also tried to setup a project to build for Linux (SDL-driver) and that went pretty smooth using the single file inclusion mechanism. That's because a lot less flags have to be set and the configuration overall is easier. But overall I would say that the Makefile approach will be the easiest to set up and maintain when using Code::Blocks. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted January 3, 2018 Report Share Posted January 3, 2018 Thanks a lot for testing, @cpu20. Much appreciated! 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