plethora of questions

Pages: 12
closed account (Dy7SLyTq)
meh... im over regexes. i got sick of them. ill just write a mini app to do it for me
closed account (S6k9GNh0)
.... wat
closed account (Dy7SLyTq)
i dont like regexs any more. i can write my own and will probably end up doing it i was just hoping there was one already made
There is a tool called decomment which comes with the pmccabe package on Debian and Ubuntu.

http://manpages.ubuntu.com/manpages/lucid/man1/decomment.1.html
http://manpages.ubuntu.com/manpages/lucid/man1/pmccabe.1.html

http://packages.debian.org/unstable/devel/pmccabe
(including a source package)

Not sure how good it is; I've only ever played with it.

Andy

PS According to the following article, when building a shared object, the constituent object files (.o) should be compiled with -fPIC flag, which makes the object code position independent (or relocatable.) If I've got the right end of the stick, you can omit it for 32-bit binaries but not for the 64-bit case.

$ gcc -fPIC -c libprint.c
$ ld -shared -soname libprint.so.1 -o libprint.so.1.0 -lc libprint.o

Shared objects for the object disoriented!
http://www.ibm.com/developerworks/library/l-shobj/

How to write dynamically loadable libraries

Ashish Bansal tells you how to write dynamically loadable libraries and suggests tools you want to use in the process. He reviews the compilation process and naming conventions, and then walks you through writing, compiling, and installing a shared library.


And this article shows how to load shared objects at runtime.

Writing DLLs for Linux apps
http://www.ibm.com/developerworks/linux/library/l-dll.html

Why write a whole app when you can just write a plugin?

Plugins and DLLs are often a great way to add functionality without writing a whole new application. In Linux, plugins and DLLs are implemented as dynamic libraries. e-business consultant and architect Allen Wilson introduces dynamic libraries and shows you how to use them to change an application after the app is running.


Does 32bit x86 code need to be specially PIC-compiled for shared library files?
http://stackoverflow.com/questions/6961832/does-32bit-x86-code-need-to-be-specially-pic-compiled-for-shared-library-files

What is the difference between `-fpic` and `-fPIC` gcc parameters?
http://stackoverflow.com/questions/3544035/what-is-the-difference-between-fpic-and-fpic-gcc-parameters
Last edited on
closed account (S6k9GNh0)
Eh... what exactly are you writing? Regex is a simple rule system to find patterns in text. You implement your own rule system?
Topic archived. No new replies allowed.
Pages: 12