Duplicate error on file drivers when compiling a dll

I am setting up a multi-dll project as it is growing. I have created the lib with the dictionary. I presume I have done it correctly as it compiled into a .lib. I created another app called Common for the common procedures. I have lined the DCT.lib in. When I compile the Common.app I am getting errors on the drivers.

ie. Duplicate symbol: ASCII in ClaASC.dll - C:\Claapps\Common\map\release\Common.MAP:1

Any suggestions as to what I may have missed?
Thanks in advance.

It might be you haven’t included ‘ONCE’ in your declarations for an INCLUDE? Type ‘Once’ into help for more.

Hi Viola,

Are you compiling your data dll into a LIB only or a DLL w/ a LIB? From what you typed it kind of sounds like you are creating just a LIB file. I have never tried to create a LIB file only and then pull that into another DLL. Normally, it gets pulled into the EXE. Check your project settings Output Type and Link Mode.
For a normal DLL they should both be set to DLL, not LIB.


It also sounds like your Common App is not set to have all files and ABC declarations in an external module. Check the following in Global Properties > Actions in your Common App:

General Tab
Generate template globals and ABC’s as External - CHECKED

File Control Tab
File Attributes - External: All External

ok so I think I have figured it out.
I had missed a couple settings.
So I’m getting there.
Now I have 3 parts

  1. dct in a dll
  2. purchasing in a dll
  3. main exe

purchasing dll compiles ok,
in the main I linked in the dll for the dct and the one for purchasing.
At first I got an error that it couldn’t find the dct.dll, so I moved it into the obj/release for the main.exe
Now I get duplicate error on everything in the dct.

I have gone through the flags 3 times and I think I have them correct.

Hi Viola,

Those settings are correct for your EXE.

For the purchasing DLL, the global properties are also correct. The project setting Output Type and Link Mode needs to be DLL.

For the data DLL, in the project setting Output Type and Link Mode also needs to be DLL.
The global properties should look this:

Make sure you don’t have any left over LIB/DLL files from earlier experiments. Make sure to delete all LIB and DLL files for your data dll, where ever they maybe.


Hi Rick
Thank you for your response.
I’m still missing something to do with where the dll’s go to use them in another app.
I deleted all the dll’s and so now when I compile the purchasing.app, I’m getting the error that the dct.dll cannot be moved because it isn’t found. It is looking for the file in clarion10\bin.
I’m not understanding how the redirection works.
This is my experiment…In my projects I set the output path to …\DLL
after I compile the dct.app the dct.dll is in the DLL folder. I added the module to purchasing with the dct.lib in the obj\release directory. That didn’t work. It also didn’t work if I said the dct.lib was in the DLL directory (because it wasn’t there)
What am I missing as to where the .lib and .dll files need to be?


Hi Viola,
Why don’t you post your redirection file. Also, what is the folder you want the generated DLLs and EXEs to go to?
Is it relative to the solution/app folder?


ok so that makes clear what I misunderstood. I thought that putting the output path was setting the redirection.
so here is the dumb question, what is the redirection file and where do I find it?


Hi Viola,
Go to Tools -> Edit base Redirection file -> (Current Version).
The default redirection file is located in the ClarionRoot\Bin folder. It’s called Clarion10.red or Clarion90.red, etc.

Also, don’t forget to include in your answer where you want the EXEs/DLLs to be created.


Below is my redirection file with my change as to where to put the DLL’s [ C:\Users\Viola\Documents\Claapps1\Formatop\PhoenixABC\DLL]
If I use this DLL folder to put the DLL’s into, when I install at the customer site, do the dll’s need to go in a DLL folder below where the exe is installed also? So maybe I should have the DLL’s go into the folder that I am compiling the main app?

Another question then is that this change in the redirection file will affect all my apps for other projects also?

So after getting the DLL’s into a folder so that I don’t have to move them each time I compile. I compile my main app and still get a zillion duplicate errors. ???


-- Default Redirection for Clarion 10.0

-- Directories only used when copying dlls
*.dll = %BIN%;%BIN%\AddIns\BackendBindings\ClarionBinding\Common;%ROOT%\Accessory\bin;%libpath%\bin\%configuration%

-- Directories only used when building with Debug configuration

*.obj = obj\debug
*.res = obj\debug
*.rsc = obj\debug
*.lib = C:\Users\Viola\Documents\Claapps1\Formatop\PhoenixABC\DLL
*.FileList.xml = obj\debug
*.map = map\debug

-- Directories only used when building with Release configuration

*.obj = obj\release
*.res = obj\release
*.rsc = obj\release
*.lib = C:\Users\Viola\Documents\Claapps1\Formatop\PhoenixABC\DLL
*.FileList.xml = obj\release
*.map = map\release

*.chm = %BIN%;%ROOT%\Accessory\bin
*.tp? = %ROOT%\template\win
*.trf = %ROOT%\template\win
*.txs = %ROOT%\template\win
*.stt = %ROOT%\template\win
*.*   = .; %ROOT%\libsrc\win; %ROOT%\images; %ROOT%\template\win
*.lib = %ROOT%\lib
*.obj = %ROOT%\lib
*.res = %ROOT%\lib
*.hlp = %BIN%;%ROOT%\Accessory\bin
*.dll = %BIN%;%ROOT%\Accessory\bin
*.exe = %BIN%;%ROOT%\Accessory\bin
*.tp? = %ROOT%\Accessory\template\win
*.txs = %ROOT%\Accessory\template\win
*.stt = %ROOT%\Accessory\template\win
*.lib = %ROOT%\Accessory\lib
*.obj = %ROOT%\Accessory\lib
*.res = %ROOT%\Accessory\lib
*.dll = %ROOT%\Accessory\bin
*.*   = %ROOT%\Accessory\images; %ROOT%\Accessory\resources; %ROOT%\Accessory\libsrc\win; %ROOT%\Accessory\template\win

Hi Viola,

You don’t want to put hard-coded paths like that in the main redirection file. That will impact every solution you use.
I generally use relative paths. That way the paths are based on where the solution is located.

Usually I have the DLL and EXE files get generated to the same folder where the APP files are located or a BIN sub-folder.
In the [debug] and [release] sections of your redirection file you can use these settings to control that
*.dll = .\bin
*.exe = .\bin
*.dll = .
*.exe = .\

But, it doesn’t sound like the redirection file is the issue with your duplicate errors.
Can you post the errors you are getting?
Also, can you include the .CWPROJ files for your 3 APPs. If you prefer, you can send the CWPROJ files to me and I’ll review them.


Hi Rick,
Not sure what I did but I have gotten rid of the duplicate errors. I set the redirection file as you suggested so that must have fixed it.
I am now compiling without errors.

Thanks for your help.