From 05b107209d013238173e0e12180518fe65531bd8 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Thu, 29 Feb 2024 09:51:45 +0100 Subject: [PATCH] Remove the C binding directory [skip-ci] * Now documented in https://book.verovio.org/installing-or-building-from-sources/library.html --- bindings/c/README.md | 39 --------------------------------------- bindings/c/main.c | 14 -------------- 2 files changed, 53 deletions(-) delete mode 100644 bindings/c/README.md delete mode 100644 bindings/c/main.c diff --git a/bindings/c/README.md b/bindings/c/README.md deleted file mode 100644 index 118a10a3edf..00000000000 --- a/bindings/c/README.md +++ /dev/null @@ -1,39 +0,0 @@ -## C function interface - -To use Verovio with any language that supports a plain C function interface you will first need to build Verovio as a library. -The compiled library (`libverovio.so`/`verovio.dll`) will contain callable C symbols. These wrapper symbols are defined in `./tools/c_wrapper.h` - -### Building libverovio.so on Linux - -```sh -cd tools -cmake -DBUILD_AS_LIBRARY=ON . -make -``` - -### Building verovio.dll on Windows using Microsoft Visual Studio Build Tools 2022 - -In addition to Microsoft Visual Studio Build Tools 2022, also [Make](https://gnuwin32.sourceforge.net/packages/make.htm) is used. - -Open `x64 Native Tools Command Prompt for VS 2022` and enter: - -``` -cd cmake -cmake -G "Unix Makefiles" -DBUILD_AS_LIBRARY=ON -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE . -make -``` - - -## Complete example in C - -To run the `main.c` example you can use gcc to compile the example and link to the pre-built library. - -```sh -gcc main.c -o main -L../../tools -lverovio -``` - -Run (without changing your default LD LIBRARY PATH): - -```sh -LD_LIBRARY_PATH=../../tools ./main -``` diff --git a/bindings/c/main.c b/bindings/c/main.c deleted file mode 100644 index be1d8f2bef9..00000000000 --- a/bindings/c/main.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "stdbool.h" -#include "stdio.h" - -// include the header with the C functions -#include "../../tools/c_wrapper.h" - -int main() -{ - printf("Calling constructor\n"); - void *pointer = vrvToolkit_constructorResourcePath("../../data"); - printf("Pointer value %p\n", pointer); - const char *options = vrvToolkit_getAvailableOptions(pointer); - printf("%s", options); -}