2011/10/6 Jacek Cała <jacek.c...@gmail.com> > I've just made a simple test executable Prog1.exe that links to > another executable Prog2.exe. You can run Prog2.exe normally (it has > it's own main function), but also you can link to it and use the > functions it exports. My Prog1.exe uses a test function from > Prog2.exe. All works as a breeze! >
LOL! i've been programming since my childhood and never thought of trying that. > A quick look on wikipedia and PE format > (http://en.wikipedia.org/wiki/Portable_Executable) shows that PE is > somewhat related to a unix COFF format. Perhaps the same trick is > possible on *nix platforms. I think that it would solve a lot of pain > in creating JSON API. > It wouldn't save much, if any, in this case. In writing the JSON API i often have to minorly refactor existing fossil functionality or change its visibility from static to non-static so that the json code can use it. More often than not i have to create separate impls for the JSON variant of a given call because the original variants generate output to stdout (which is absolutely taboo in JSON mode, and must be avoided at all costs because it would corrupt the output). If i were using fossil.exe as a library (of sorts) i couldn't do that - i would still be limited to the set of features which are not static. Whether or not a function in fossil is static is almost arbitrarily decided - if the function is only used in one file, it's typically static, else it is not static. -- ----- stephan beal http://wanderinghorse.net/home/stephan/
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users