sammycage / plutosvg

Tiny SVG rendering library in C
MIT License
247 stars 17 forks source link

How to build on Windows using (gcc, clang, CMAKE) #1

Closed GordonVi closed 3 years ago

GordonVi commented 3 years ago

I git cloned the project. Doesn't work
git cloned the sister plutovg and combined all files into a single folder. Still doesn't work.

Could you make an animated GIF showing this working on Windows or Linux? A simple proof of concept.

sammycage commented 3 years ago

Open your Terminal and enter the following command

git clone --recursive https://github.com/sammycage/plutosvg.git
cd plutosvg
mkdir build
cd build
cmake ..
make
GordonVi commented 3 years ago

This is what is happening:

http://virasawmi.com/gordon/video/github_posts/plutosvg-2021-01-13_20-02-11.mp4

sammycage commented 3 years ago

Cmake/make under windows (instead of Linux) is sometimes quite complicated. Please took a look at this

GordonVi commented 3 years ago

What OS and compiler are you using? I can make a vm to try it out.

sammycage commented 3 years ago

What OS and compiler are you using?

Linux debian, gcc 10

I can make a vm to try it out.

You can use c++ ide that supports CMAKE such as QT Creator

GordonVi commented 3 years ago

No way to just make 4 simple files?

library.h library.c example.c
graphic.svg

The goal being where one can just use GCC or CLang

sammycage commented 3 years ago

I don't understand.... Maybe this is not the right place to ask this question, you can try stackoverflow

GordonVi commented 3 years ago

This is still unresolved.

sammycage commented 3 years ago

Please make your questions clear

GordonVi commented 3 years ago

This package does not work with Windows. It's fine if that's not the scope and you want to leave it like that.

The request is to make a "win-demo" with all the libraries and such in the same folder, working. If you're not a Windows coder, it's fine.

sammycage commented 3 years ago

This package does not work with Windows.

PLUTOVG AND PLUTOSVG are written in pure C (so it is platform independent library).

The request is to make a "win-demo" with all the libraries and such in the same folder, working.

Just compile any C/C++ program using your system and show me your steps. So i can help

GordonVi commented 3 years ago

Tried it with Latest Ubuntu (20.xx, non LTS). Installed GCC, CMAKE, Git.

Same issues. Specifically, Win/Lin not finding plutovg.h

Is there no way to simply just make 1 header, 1 C include for the functions, and 1 Example.c that fits in a simple folder? And just be able to compile something that works with a "gcc -o example example.c" ?

sammycage commented 3 years ago

Please can you screenshot your build steps on your ubuntu..

sammycage commented 3 years ago

When i have time, i will write one header file for you.

sammycage commented 3 years ago

plutosvg-one.zip

gcc -o example example.c -lm
./example 
GordonVi commented 3 years ago

Work on the following:

sammycage commented 3 years ago

Wow... It is very late here. Good night