I have generated 3 dynamic libraries (libbasic.so, liblia.so and libsos.so), and my application 'crit_pts' successfully compiles and links to these libs using this command.
All these libraries have *.c files, since they were written in an ancient age, and uses some declarations that interfere with the modern c++ macro declarations.
The application 'crit_pts' also compiles some *.c files and every thing works fine.
Now, I have a new application 'appl' which only has main.cc file. When I am compiling it, I have to add the compiler flag -fno-operator-names to discard the conflict in macro definitions, and be able to compile cpp. The compilation goes fine, but the linking gives me an error. This is the command that is used to link
main.o: In function `main':
....../appl/main.cc:89: undefined reference to `sos_matrix(int, int, double, int, int)'
The function sos_matrix is being called in the earlier application 'crit_pts' as well, and I cant think of any other difference than switching from *.c to *.cc files.
My question is:
1) could switching from *.c to *.cc create this issue ?
2) what is the work around this ?