Changes between Version 7 and Version 8 of AppLibraries
- Timestamp:
- Dec 8, 2011, 1:10:52 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AppLibraries
v7 v8 1 1 = Dynamic library naming issues = 2 2 3 Suppose your application uses a dynamic library, say ''' vcomp90.dll'''.3 Suppose your application uses a dynamic library, say '''example.dll'''. 4 4 Recall that [BoincFiles BOINC files are immutable]. 5 Hence there is a problem if either 5 If you use the physical name '''example.dll''' 6 there will be a problem if either 6 7 7 8 * You support multiple platforms (say, Win32 and Win64), 8 and there are different versions of ''' vcomp90.dll''' for each platform.9 and there are different versions of '''example.dll''' for each platform. 9 10 * You need to update to new versions of the library. 10 11 11 One solution is to give the libraries names that encode the 12 platform and version number, 13 e.g. '''vcomp90_win32_1_17.dll''' and '''vcomp90_win64_1_17.dll'''. 14 However, this may be infeasible 15 because the name '''vcomp90.dll''' is embedded in your Makefiles and 16 would be difficult to change. 17 18 A second solution, which doesn't require changing Makefiles, 19 is to give the libraries different physical names but the same logical name. 20 To do this, use something like the following in your 21 [AppVersionNew#Theversiondescriptionfile version description file]: 12 The easiest solution is: 13 * Give the libraries physical names that encode the platform and version number, 14 e.g. '''example_win32_1_17.dll''' and '''example_win64_1_17.dll'''. 15 * Use '''example.dll''' as the logical name. 16 To do this, use something like the following in your 17 [AppVersionNew#Theversiondescriptionfile version description file]: 22 18 {{{ 23 19 ... 24 20 <file> 25 <physical_name> vcomp90_win32_1_17.dll</physical_name>26 <logical_name> vcomp90.dll</logical_name>21 <physical_name>example_win32_1_17.dll</physical_name> 22 <logical_name>example.dll</logical_name> 27 23 <copy_file/> 28 24 ... … … 31 27 The '''copy_file''' flag tells the BOINC to copy the library to 32 28 the application's runtime directory. 29 30 == Avoiding name conflicts == 31 32 The search order for libraries is: 33 34 1. The project directory 35 1. The slot directory 36 1. other directories 37 38 Hence if you use '''example.dll''' as a physical name in one app version, 39 other app versions will use that library even if they 40 use the above scheme. 41 42 To avoid this problem, use logical names that don't conflict with physical names.