Code Monkey home page Code Monkey logo

Comments (14)

8bitbunny avatar 8bitbunny commented on July 18, 2024 1

You can even build a executable from withing visual studio so people can try it themselves without compiling ;)

from lv_port_pc_eclipse.

kisvegabor avatar kisvegabor commented on July 18, 2024 1

Hi,

However there is no an out of the box Visual studio project so far some people already confirmed that the library can be built in Visual Studio.

I just releases v5.1.1 where you can disable the use of Variable Length Arrays in lv_conf.h which was the only not supported thing in Visual Studio. (LV_COMPILER_VLA_SUPPORTED).

from lv_port_pc_eclipse.

kisvegabor avatar kisvegabor commented on July 18, 2024 1

I suggest this reading: https://guides.github.com/activities/forking/

from lv_port_pc_eclipse.

kisvegabor avatar kisvegabor commented on July 18, 2024

Thanks you for this information. I will check and try it soon!

from lv_port_pc_eclipse.

kisvegabor avatar kisvegabor commented on July 18, 2024

Good idea. However it won't be cross-platform but it might be useful for a lot of people.

from lv_port_pc_eclipse.

TheGrovesy avatar TheGrovesy commented on July 18, 2024

Has this been taken any further? Getting the simulation buildable from visual studio would be really useful to us.

from lv_port_pc_eclipse.

TheGrovesy avatar TheGrovesy commented on July 18, 2024

Many thanks for the reply. Nice to see the project is still active :)

Any ideas how the SDL part should be handled for visual studio (windows) as your installation instructions talk about installing Eclipse and MinGW etc.

Does anyone already have a working project they can share?

from lv_port_pc_eclipse.

TheGrovesy avatar TheGrovesy commented on July 18, 2024

I now have this building and running from Visual Studio without the need for MinGW. I will try and share it in the next day or so.

from lv_port_pc_eclipse.

kisvegabor avatar kisvegabor commented on July 18, 2024

Awesome! Thank you very much!

from lv_port_pc_eclipse.

TheGrovesy avatar TheGrovesy commented on July 18, 2024

Sorry i completely forgot to share this. For now its a complete zip file containing the Visual Studio solution, the LittlevGL source, the SDL binaries and a few extra files which are needed to get around the need for mingW. At some point I plan to create a github repo that links to the LittlevGL source but not sure how yet (new to github).
Here is the link
There is a ReadMe file within the Visual Studio folder where I have defined what I did to get this working. I also had to change some of the littlevGL files and have a few suggestions as follows:

Changes:

main.c
> Added #include <windows.h>
> Changed usleep(1000) to Sleep(1)

main.c, mouse.c, monitor.c, keyboard.h
> Change #include "SDL2/SDL.h" to #include "SDL2/include/SDL.h"

pc simulator/lv_conf.h
> change line 85 '#define LV_COMPILER_VLA_SUPPORTED 1' to a zero '0'

Had to remove lv_tests folder from the project due to 'C2099 Error Initializer is not a constant' Regarding the use of macro LV_COLOR_XXX

Notes/Suggestions to Author:

Maybe add a '#ifndef WIN32' around '#define LV_COMPILER_VLA_SUPPORTED 1' and define WIN32 with a zero.
strcpy is considered unsafe so I had to disable deprecation using _CRT_SECURE_NO_WARNINGS in Properties > C/C++ > Preprocessor > Preprocessor Definitions
Suggest changing the header includes for SDL2/SDL.h to SDL2/include/SDL.h

Let me know if you have any issues or comments. Thanks.

@ramonschepers Hope this helps you. It does however still use SDL. Is there a reason why you didn't want to use that library?

from lv_port_pc_eclipse.

kisvegabor avatar kisvegabor commented on July 18, 2024

Hi,

Thank you very much!
I'm on Linux and unfortunately I didn't used Visual Studio so far. However I just installed Windows in Virtual Box so will try the project soon!

from lv_port_pc_eclipse.

TheGrovesy avatar TheGrovesy commented on July 18, 2024

Great, I would be grateful to have any feedback from you.

My next plan will be to set this up through Github and link to your repo so any updates you make can be easily tested... I just need to work out Git... its quite different from SVN which I am used to. Any tips on linking to your repo would be create.

from lv_port_pc_eclipse.

kisvegabor avatar kisvegabor commented on July 18, 2024

Hi,

I tested your project in Visual Studio 2017.

I needed to "Retarget project" (Right click on project > Retarget project) to find the standard header files.

After it, the compiler didn't found the SDL related functions. For example:
LNK2019 unresolved external symbol SDL_CreateThread referenced in function monitor_init

Have you also used Visual Studio 2017? Or do you have any idea?

from lv_port_pc_eclipse.

kisvegabor avatar kisvegabor commented on July 18, 2024

@TheGrovesy Meanwhile I figured out how to create a Visual Studio project with SDL from scratch. This video tutorial helped a lot: https://www.youtube.com/watch?v=Sfn7yOiwJLw

I followed your idea to copy SDL into the project so no extra copies of library files are required.
I also added some new config options to the lvgl, lv_examples, lv_drivers to support Visual Studio out of the box.

Here is the project: https://github.com/littlevgl/lv_projects/tree/master/visual_studio_2017_sdl_x64

So after near one year a close this issue :)

If you find bugs or have remarks, please open a new issue for them!

Thank you very much for your contribution! :)

from lv_port_pc_eclipse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.