Compiling A Shared library
I have a library that I've been writing for the past couple years, and I finally decided to port it to C from C++. After doing all this and making sure the syntax was right in all the code, I now have come across an error I can't seem to figure out. When I try to compile the library without a main function, it tells me that main is undefined and fails. But, if I put a main function in, it compiles and builds. But attempting to link something to it will result in a redefinition of main error. I can't seem to do either of the two, and am stumped. I am using GCC in Linux, if it makes a difference.