-
-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve vala to support to generate libraries and bindings #1618
Labels
Milestone
Comments
shared libraryadd_rules("mode.release", "mode.debug")
add_requires("glib")
target("mymath")
set_kind("shared")
add_rules("vala")
add_files("src/mymath.vala")
add_values("vala.header", "mymath.h")
add_values("vala.vapi", "mymath-1.0.vapi")
add_packages("glib")
target("test")
set_kind("binary")
add_deps("mymath")
add_rules("vala")
add_files("src/main.vala")
add_packages("glib") $ xmake -v
[ 12%]: compiling.vala src/mymath.vala
/usr/bin/valac -C -b build/.gens/mymath/linux/x86_64/release/src --vapi=build/linux/x86_64/release/mymath-1.0.vapi -H build/linux/x86_64/release/mymath.h src/mymath.vala
/usr/bin/ccache /usr/bin/gcc -c -m64 -fPIC -O3 -isystem build/linux/x86_64/release -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -DNDEBUG -o build/.objs/mymath/linux/x86_64/release/gens/src/mymath.c.o build/.gens/mymath/linux/x86_64/release/src/mymath.c
[ 25%]: linking.release libmymath.so
/usr/bin/g++ -o build/linux/x86_64/release/libmymath.so build/.objs/mymath/linux/x86_64/release/gens/src/mymath.c.o -shared -fPIC -m64 -L/usr/lib/x86_64-linux-gnu -s -lgobject-2.0 -lglib-2.0 -lpcre -lz -lffi -lffi_pic
checking for g++ ... /usr/bin/g++
checking for the linker (ld) ... g++
[ 62%]: compiling.vala src/main.vala
/usr/bin/valac -C -b build/.gens/test/linux/x86_64/release/src build/linux/x86_64/release/mymath-1.0.vapi src/main.vala
/usr/bin/ccache /usr/bin/gcc -c -m64 -fvisibility=hidden -O3 -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem build/linux/x86_64/release -DNDEBUG -o build/.objs/test/linux/x86_64/release/gens/src/main.c.o build/.gens/test/linux/x86_64/release/src/main.c
checking for /usr/bin/g++ ... ok
checking for flags (-Wl,-rpath=@loader_path) ... ok
> g++ "-Wl,-rpath=@loader_path" "-m64" "-m64"
[ 75%]: linking.release test
/usr/bin/g++ -o build/linux/x86_64/release/test build/.objs/test/linux/x86_64/release/gens/src/main.c.o -m64 -L/usr/lib/x86_64-linux-gnu -Lbuild/linux/x86_64/release -Wl,-rpath=$ORIGIN -s -lgobject-2.0 -lglib-2.0 -lpcre -lz -lffi -lffi_pic -lmymath
[100%]: build ok! static libraryadd_rules("mode.release", "mode.debug")
add_requires("glib")
target("mymath")
set_kind("static")
add_rules("vala")
add_files("src/mymath.vala")
add_values("vala.header", "mymath.h")
add_values("vala.vapi", "mymath-1.0.vapi")
add_packages("glib")
target("test")
set_kind("binary")
add_deps("mymath")
add_rules("vala")
add_files("src/main.vala")
add_packages("glib") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://wiki.gnome.org/Projects/Vala/Bindings
https://wiki.gnome.org/Projects/Vala/SharedLibSample
The text was updated successfully, but these errors were encountered: