| 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]: |
| | 21 | Name collisions can be avoided by giving the libraries physical names |
| | 22 | that encode the platform and version number, |
| | 23 | e.g. '''example_win32_1_17.dll''' and '''example_win64_1_17.dll'''. |
| | 24 | |
| | 25 | It may be inconvenient to rebuild the application to refer to these names |
| | 26 | rather than '''example.dll'''. |
| | 27 | To avoid this, include something like |
| 26 | | |
| 27 | | The '''copy_file''' flag tells the BOINC to copy the library to |
| 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. |
| | 36 | in your [AppVersionNew#Theversiondescriptionfile version description file]. |
| | 37 | This tells the BOINC client to copy the library to |
| | 38 | the application's slot directory with the name '''example.dll'''. |
| | 39 | When the application tries to load '''example.dll''', |
| | 40 | it will look in the project directory and not find it; |
| | 41 | then it will look in the slot directory and find it there. |