I am trying to make a shared library in scons but it keeps telling me there is an error because there is an undefined reference to some functions I wrote. I include the .c file from which I am trying to make the shared library. For some reason it is recognizing the cpp file I am inputting but not the .c file.
Your help would be much appreciated`
import os
Import('env')
env = env.Clone()
env.Append(CPPPATH=['include'])
env.Append(LIBS=['serial'])
env.Append(LIBPATH=['/usr/local/lib'])
env.Append(LIBS=['boost_date_time','boost_system', 'boost_thread'])
lib = []
binaries = []
lib.extend(env.SharedLibrary('File1.c', 'File2.cpp']))
print "the error is here"
test_env = env.Clone()
test_env.Append(LIBS=['Program'], LIBPATH=['.'])
binaries.extend([
test_env.Program('test_Program', Glob('test/test_Adafruit.cpp')),
])
Return('lib', 'binaries')
during the linking phase: I get the errors like:
LINK build/test_Program
build/test_Program/libProgram.so:
undefined reference to function(int, sensor_xyz_s*)'