diff --git a/Makefile b/Makefile
index e3625bb5d1b2058cf8ef8c871cb74bc61c00cea6..a327be90036e3c2a25687a2d2d9a768079bc1dac 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,10 @@
 
 # you will need to set the BINARY_C variable to point
 # to the root binary_c directory
+ifeq ($(BINARY_C),)
+  $(error BINARY_C is not set)
+endif
+
 
 CC      := gcc
 LD      := gcc
@@ -12,7 +16,7 @@ LIBS 	:= -lbinary_c $(shell $(BINARY_C)/binary_c-config --libs)
 C_SRC   := binary_c_python_api.c
 OBJECTS := $(C_SRC:.c=.o)
 OBJ_FLAGS := -c
-CFLAGS := -fPIC $(shell $(BINARY_C)/binary_c-config --flags) -I$(BINARY_C)/src/ -I$(BINARY_C)/src/API 
+CFLAGS := -fPIC $(shell $(BINARY_C)/binary_c-config --flags | sed s/-fvisibility=hidden// ) -I$(BINARY_C)/src/ -I$(BINARY_C)/src/API 
 SO_FLAGS := -shared -o
 SO_NAME := libbinary_c_api.so
 
diff --git a/build/temp.linux-x86_64-3.6/binary_c_python.o b/build/temp.linux-x86_64-3.6/binary_c_python.o
index b44b0940a5d7e7e3e50b4be5294dae67ed131aa5..73cbc15572dc9a3ac018938f60bbf4f277e8dbaa 100644
Binary files a/build/temp.linux-x86_64-3.6/binary_c_python.o and b/build/temp.linux-x86_64-3.6/binary_c_python.o differ
diff --git a/setup.py b/setup.py
index e5e1062595eb77ca48c98e97833dbbcb8522fea3..cbd77df3804dce2ca919f783908d14803dc9cdd1 100644
--- a/setup.py
+++ b/setup.py
@@ -11,6 +11,7 @@ binary_c_config = os.environ['BINARY_C']+'/binary_c-config'
 binary_c_incdirs = subprocess.run([binary_c_config,'incdirs_list'],stdout=subprocess.PIPE).stdout.decode('utf-8').split()
 binary_c_libdirs = subprocess.run([binary_c_config,'libdirs_list'],stdout=subprocess.PIPE).stdout.decode('utf-8').split()
 binary_c_cflags =  subprocess.run([binary_c_config,'cflags'],stdout=subprocess.PIPE).stdout.decode('utf-8').split()
+# binary_c_cflags.remove('-fvisibility=hidden')
 binary_c_libs = subprocess.run([binary_c_config,'libs_list'],stdout=subprocess.PIPE).stdout.decode('utf-8').split()
 
 # create list of tuples of defined macros