|
-
September 15th, 2010, 12:05 PM
#1
Linking both 32- and 64-bit dlls
I am using a third-party library that has seperate 32 and 64 bit libraries:
C:\Program Files (x86)\CompanyName\LibraryName.lib
and
C:\Program Files (x86)\CompanyName\x64\LibraryName.lib
The libraries are not COM and have no namespaces by which to differentiate them, and all the function names are the same.
My project lead wants my library that incorporates theirs to dynamically link to the correct one at runtime (it is safe to assume the LibraryName.dll exists on the computers that run this program).
How might I go about doing that? I can't use preprocessors because they run at compile time but I don't know any way to link the libraries (or for that matter, determine bit count) at runtime. I could just reference both libs but I'm sure I would just get ambiguity errors.
Help me out, pros. I need direction.
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|