Editing Default Redirection file


#1

The redirection file in Clarion determines where the IDE reads files from, and writes files to.

By default, EXE and DLL files are created in the same folder as the APP, but LIB files are stored in 2 places, in \OBJ\DEBUG when compiling in debug mode and \OBJ\RELEASE when compiling in release mode.

Unfortunately separating DLL and LIB files can cause some major problems in your app, ones which are difficult to spot and can result in “random” (very strange) behaviours. This is especially the case where you have done say, a full release build of your system, and then at some later time start to compile one (or more) apps in debug mode to find a bug.

Fortunately eradicating a whole class of problems is trivial to do by editing the Redirection file to place LIB files in the same folder as the DLL. This makes sense, the LIB and DLL are created at the same time and must “match” storing an old copy of the LIB in another folder can only lead to pain and suffering.

to edit the Redirection file go to the Tools menu in the IDE.

At a minimum add the following line to both the [DEBUG] and the [RELEASE] sections.

*.lib = .

This explicitly tells the system to create libs into the local folder (the same folder as the app.)

I usually make it explicit for all 3 file types.

*.lib = .
*.dll = .
*.exe = .

this saves a possible problem if the *.dll or *.exe entry lower down does not begin with . - leading to files being created in the Clarion folder, not the app folder (a source of a whole other kind of problem.)