Duplicate Symbol Errors for Clarion 9058 and 9059
Note: ProScan 2.0 and ProImage 2.0 now use Dynamic DLL loading so if you upgrade to these versions this problem is totally eliminated. This tech note only applies to users who have older versions of ProScan and ProImage.
In November of 2007 when Clarion 9058 was released, SoftVelocity created a problem for all 3rd Party vendors (and anyone else that uses API calls) when they included various Windows API calls without consideration that other vendors or programmers use them too.
This problem persists in Clarion 9059 (as of November 2008).
An example of this error is:
Link error: Duplicate symbol: DllGetVersion, file yourfile.obj Link error: Duplicate symbol: SHGetFolderPathA
Both ProScan and ProImage use the SHGetFolderPathA API call to get the location of the Windows TEMP folder.
Even though our prototypes are correctly name mangled (which prevents problems within Clarion) the fact that the SoftVelocity LIB file and our LIB file both include information for the same Windows API causes the error.
We have been in touch with SoftVelocity and hope that they will find a better long term solution (since this potentially affects all API usage by any developer or vendor), but in the interim - here is a short term fix for the problem.
Solution:
Edit the PS_Utils.tpw file (in 3rdParty\Template) and comment out or remove this line:
#PROJECT('PS_Utils.LIB')
That will prevent ProScan/ProImage from adding it's LIB file for SHGetFolderPathA (which is the only thing in the LIB file right now).
We will be providing a long term fix in the next release of ProScan/ProImage, but we are waiting for now to see if SoftVelocity does the right thing and fixes the problem before we make changes in how the templates work.
Our apologies to all our customers for SoftVelocity breaking your code!
|