How to make a (compiled) code that other programmers can use (cross-platform)?

(C++ question) I need to be able make a compiled code (like a .dll?) which other programmers can use on linux, win,, mac, etc.

The compiled code would simply do calculations and spit out an answer in memory.

I need it to have certain functions that they can easily call and understand (without actually seeing the source).

Does anyone know if this is possible and how?

Thanks in advance,
There is really no way to do it cross-platform, but you can create .dll's and .a's separately for windows and linux. Not sure what the file extension is for Mac, as I don't use it, but it would function the same. If you are asking how to make them, you would link the .o files with g++ -shared ...other stuff.... Most IDEs have options to make .dll's.
Topic archived. No new replies allowed.