another cool RTInfo trick - i want in runtime

Vladimir Panteleev vladimir at thecybershadow.net
Thu Jan 16 08:59:16 PST 2014


On Thursday, 16 January 2014 at 16:37:16 UTC, Adam D. Ruppe wrote:
> I don't use rdmd myself so the specific solution should 
> probably be guided by people who do.

Well, the beauty of rdmd is that you don't need to mess with 
options in the general case. My setup is that generally I press 
"Enter" on a .d file and it is built into an .exe (if there is an 
entry point in any imported modules) - no other action required. 
If I had to modify the command line for every invocation, that 
would not work for my case, so I'd have to write a rdmd wrapper 
to look for additional command-line options in a configuration 
file in the current directory, or implement something like that 
in rdmd itself.

If these requirements can be specified in the source code itself, 
that would be much better. In our case it would simply be the 
presence of a file in the project search path. An existing 
example of this is pragma(lib) - instead of telling the user to 
specify which libraries to add to the linker command line, or 
providing a makefile (with all its problems), a pragma(lib) can 
be used to pull in those libraries automatically.


More information about the Digitalmars-d mailing list