GithubHelp home page GithubHelp logo

franko / graph-toolkit Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 3.0 739 KB

Lua Graphics Toolkit

License: GNU General Public License v3.0

Makefile 1.68% Shell 0.19% Lua 8.94% C++ 80.75% C 7.57% Meson 0.87%

graph-toolkit's People

Contributors

franko avatar ladc avatar markuman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graph-toolkit's Issues

Binary for windows

Hi

Any chance of a version 1.0 binary for windows (preferably without the dependency upon pthreadGC2.dll) ? I can't get the current source to compile using TDM-GCC Compiler Suite for Windows Series 5.

Many thanks

Gavin

Lua 5.2 support

Continuing from #3 (comment)

the current version of the library won't work in Lua > 5.1; for one, it uses C API functions that were removed in 5.2 (e.g. lua_getfenv/lua_setfenv).

Your uses should be simple enough to replace with lua_getuservalue.

FWIW, I write my C libraries in 5.2 style, and get them to work in 5.1+luajit with compat-5.2, it works out quite well :)

Add rockspec

Please publish a rockspec so that the library can be installed via luarocks (and used as a dependancy!)

compiling lua-graph failed

$ make clean
rm -f *.o *.so *.dll libgraphcore.so libnatwin.so
[markus@arch graph-toolkit]$ make
Compiling str.c
Compiling gs-types.c
Compiling lua-utils.c
Compiling lua-properties.c
Compiling gamma.cpp
Compiling printf_check.cpp
Compiling utils.cpp
Compiling window_registry.cpp
Compiling fonts_search_x11.cpp
Compiling image_write_x11.cpp
Compiling fonts.cpp
Compiling agg_font_freetype.cpp
Compiling plot.cpp
plot.cpp: In member function 'double plot::draw_axis_m(plot::axis_e, units&, const agg::trans_affine&, ptr_list<draw::text>&, double, agg::path_storage&, agg::path_storage&)':
plot.cpp:198:22: warning: '*((void*)(& bb)+8).agg::rect_base<double>::y2' may be used uninitialized in this function [-Wmaybe-uninitialized]
     opt_rect<double> bb;
                      ^
plot.cpp:198:22: warning: '*((void*)(& bb)+8).agg::rect_base<double>::x2' may be used uninitialized in this function [-Wmaybe-uninitialized]
plot.cpp:198:22: warning: '*((void*)(& bb)+8).agg::rect_base<double>::y1' may be used uninitialized in this function [-Wmaybe-uninitialized]
plot.cpp:198:22: warning: '*((void*)(& bb)+8).agg::rect_base<double>::x1' may be used uninitialized in this function [-Wmaybe-uninitialized]
Compiling plot-auto.cpp
Compiling units.cpp
Compiling colors.cpp
Compiling markers.cpp
Compiling draw_svg.cpp
Compiling canvas_svg.cpp
Compiling lua-draw.cpp
Compiling lua-text.cpp
Compiling text.cpp
Compiling agg-parse-trans.cpp
Compiling lua-plot.cpp
lua-plot.cpp: In function 'int plot_get_legend(lua_State*)':
lua-plot.cpp:832:27: warning: 'pos' may be used uninitialized in this function [-Wmaybe-uninitialized]
     lua_rawgeti(L, -1, pos);  /* push leg_table[pos] */
                           ^
lua-plot.cpp: In function 'int plot_set_legend(lua_State*)':
lua-plot.cpp:799:27: warning: 'pos' may be used uninitialized in this function [-Wmaybe-uninitialized]
     lua_rawseti(L, -2, pos);  /* leg_table[pos] = legend */
                           ^
lua-plot.cpp:774:26: note: 'pos' was declared here
     sg_plot::placement_e pos;
                          ^
Compiling bitmap-plot.cpp
Compiling lua-graph.cpp
gcc -fPIC -shared str.o gs-types.o lua-utils.o lua-properties.o gamma.o printf_check.o utils.o window_registry.o fonts_search_x11.o image_write_x11.o fonts.o agg_font_freetype.o plot.o plot-auto.o units.o colors.o markers.o draw_svg.o canvas_svg.o lua-draw.o lua-text.o text.o agg-parse-trans.o lua-plot.o bitmap-plot.o lua-graph.o -o libgraphcore.so -lfreetype  -lagg  -lX11  -lluajit-5.1  -lpthread -lsupc++
/usr/bin/ld: str.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
str.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:165: recipe for target 'libgraphcore.so' failed
make: *** [libgraphcore.so] Error 1

Any ideas? Adding -fPIC to line 165 doesn't solve this problem.

$ gcc --version
gcc (GCC) 4.9.1 20140903 (prerelease)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


$ luajit -v
LuaJIT 2.0.3 -- Copyright (C) 2005-2014 Mike Pall. http://luajit.org/


$ pacman -Qi agg
Name           : agg
Version        : 2.5-6
Description    : A High Quality Rendering Engine for C++
Architecture   : x86_64
URL            : http://pkgs.fedoraproject.org/cgit/agg.git
Licenses       : GPL
Groups         : None
Provides       : antigrain
Depends On     : gcc-libs  sdl  freetype2
Optional Deps  : None
Required By    : None
Optional For   : None
Conflicts With : None
Replaces       : antigrain
Installed Size : 1954.00 KiB
Packager       : Jan Alexander Steffens (heftig) <[email protected]>
Build Date     : Sun May 4 06:20:48 2014
Install Date   : Wed Oct 15 21:37:59 2014
Install Reason : Explicitly installed
Install Script : No
Validated By   : Signature

[markus@arch graph-toolkit]$ 

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.