- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.4k
 
Running FDB Client API Locally
        Nim Wijetunga edited this page Apr 28, 2021 
        ·
        3 revisions
      
    When developing on FDB it may be important to run a .cpp/.py/.java file using the client bindings built locally (for example you added a new function to the C API and want to test it).
- Set 
LD_LIBRARY_PATHto point to a directory containinglibfdb_c.sousing the following command:export LD_LIBRARY_PATH=/home/<user>/build/lib/ - Compile your C++ file(s) using a command similar to: 
g++ -o <exe_name> -I ~/build/bindings/c/foundationdb/ -I ~/build/bindingtester/tests/c/ -std=c++17 -L ~/build/bindings/c/ -lfdb_c -lpthread a.cpp b.cpp - When you now run 
./<exe_name>it should reflect any changes you made to the C client API 
If you're running into issues (i.e a new function you added is not showing up) try running ldd <path-to-binary> to check the library dependencies of a binary (to make sure it's loading libfdb_c correctly).
export LD_LIBRARY_PATH=/home/<user>/build/lib/- Given a python file you can simply run the following command: 
PYTHONPATH=~/build/bindings/python/ python <file>.py 
export LD_LIBRARY_PATH=/home/<user>/build/lib/- First compile your file using the following command: 
javac -cp ".:/home/<user>/build/packages/fdb-java-7.0.0-PRERELEASE.jar" Example.java - Run the java file as follows: 
java -cp ".:/home/<user>/build/packages/fdb-java-7.0.0-PRERELEASE.jar" Example.java