User forums > General (but related to Code::Blocks)
not for GNU C11 + error class WXDLLIMPEXP_FWD_BASE wxCStrData
ivan braga:
Do not misunderstand, I will not use SDL, I will use native wxwidgets drawings.
Just to clarify.
sodev:
So what do you need LittlevGL for then? LittlevGL and wxWidgets are both GUI Toolkits, you need only one.
ivan braga:
Ok, Sodev.
I believe I have to take a different approach.
Come on, let me quote one more time. "https://forums.wxwidgets.org/viewtopic.php?t=44866".
As here is a forum, or a place to exchange information, especially in relation to C::B.
I'm pretty sure it's a mistake of my part that this is in the issue of configuring the C::B + WXWIDGETS environment.
I quoted sources, links, explained the way I did, how I performed, but no one tried to reproduce.
It does not cost much:
--- Quote ---My first steps were:
Step 1 - I created a default program using the CB wizard, so far no problem, I added a simple button using the wxSmith wizard so I compiled and executed without any problem.
Step 2 - I added the lvgl folder, it can be downloaded at "https://github.com/littlevgl/pc_simulator", which is used to create screens using SDL with eclipse.
--- End quote ---
Think like this:
Forget the library I quoted above, but in some magical way and without using such a library, I got the same error already described, where I should look, what should I see.
If I were the absolute developer of wxwidgets, code :: blocks, LittlevGL would not be here asking what I missed, and where the error might be.
No one here has an obligation to answer, but if you answer and I do not just tell you, but ask a question as broad as the questioning.
"LittlevGL and wxWidgets are both GUI Toolkits"
Exactly, I want to join the whole facility given by CB + wxwidgets + wxSmith, integrating the part that no one even looked at from LittlevGL, replacing SDL with wxwidgets to create an IDE drag and drop.
Was there lack of clarity?
oBFusCATed:
The problem is that the options you've specified for wxWidgets contain C++ only option and the library you're building is C library.
Unfortuantely C::B doesn't know how to filter all flags, so as far as I can see the only way to compile this in C::B is to move the .c files in a separate target which is compiled to a static library and then you link it in the main executable.
BlueHazzard:
Ok, i think we got this now:
1) You want to use wxWidgets as your emulated display
2) You want to use Codeblocks to draw this emulator, for adding buttons and so on
3) You use a wxImage to paint the LittlevGL output on
4) You would like to do this all in codeblocks
5) The problem is that LittlevGL is a c-library and wxWidgets is a c++ library and codeblocks mixes c and c++ compiler flags into one command line
This is the point where we are as far as i understand it.
I still have some questions:
--- Quote ---PS.
Code:
gcc -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -Wall -g -I/include/wx-3.0/wx -I/media/ilb/HD_DADOS/Documentos/Arquivos_Fontes/CB_WX_Source/cb/trunk/src/include/tinyxml -I/media/ilb/HD_DADOS/Documentos/Arquivos_Fontes/CB_WX_Source/cb/trunk/src/sdk/wxscintilla/include -c /media/ilb/HD_DADOS/Documentos/Projetos_CodeBlocks/pjt_lvg_12122018_wx/lvgl/lv_core/lv_indev.c -o obj/Debug/lvgl/lv_core/lv_indev.o
and why the **** do you mix codeblocks source with littlevgl source? They have absolutely nothing to do with each other....
--- End quote ---
The solution that i would go (i have not tried it it builds for me without errors, but i do not know if it works):
1) Open codeblocks
2) Create a new wxWidgets project with File->New->Project
3) Copy the "lvgl" from the extracted archive downloaded form the lvgl site into your project folder
4) In Codeblocks create a new build target:
4.1) Project->Properties->Build targets->Add->libvgl
4.2) Change the output type and output filename:
4.2.1) Select the "liblvgl" from the right-> Type= "static library" to build a static library
4.2.2) Output filename: "lvgl\bin\libvgl.a"
4.2) Close the dialog with OK
5) Add the lvgl files to the project:
5.1) Project->Add files recursively->Select the copied "lvgl" folder and hit Ok
5.2) In the first pop up dialog "Multiple selection" hit simply OK
5.3) In the "select targets this file...." select ONLY "libvgl"
6) Prepare the target to get compiled:
6.1) Project->build options->select the project name on the left->Compiler settings->#defines-> Add "LV_CONF_INCLUDE_SIMPLE"
6.2) In the same dialog->Search directories->Add->"lvgl" (this is the folder where your "lv_conf.h" file should be
6.3) Select the "Debug" target from the left->Linker settings->Add->"lvgl\bin\libvgl.a"
6.4) Close dialog with OK
7) Build the whole thing:
7.1) From the drop down menu near the build symbol select "libvgl"-> Hit the build button. Should finish without error
7.2) Add
--- Code: ---#include "lvgl/lvgl.h"
--- End code ---
and
--- Code: --- lv_init ();
--- End code ---
to the YOURPROJECTNAMEApp.cpp file
7.3) Select "Debug" from the drop down menu and hit the build button.
8) Enjoy the mighty build process
If any error occurs:
1) Describe your exact steps until this error
2) Post all information we request
3) Follow the guidelines in this link http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
--- Quote ---I try to explain the least, but with the utmost clarity, because English is not my native language.
--- End quote ---
We are all non native english speakers so this makes communication even more difficult. Use easy words, Use step by step lists and so on...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version