Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Brief description: We have a few C++ dlls which are targeting 32 bit and 64 bit platforms separately. I want to build my project with the corresponding target platform with the appropriate DLLs being fetched from different source folders. I will make a setup package based on this. I would like your views and approaches to this problem. An easy to implement solution would be great but then again, please pour in your suggestions.
Posted
Comments
Kornfeld Eliyahu Peter 1-Feb-16 5:43am    
If I understood right, you want add references with conditions?
It may be done by hand editing the project file...
I done it for files (not references), but it may work for you too...
http://www.codeproject.com/Articles/622401/Embed-only-when-you-need
Da-broken-Breakpoint 2-Feb-16 1:34am    
I am wondering about how i can dynamically refer to the 32bit and 64bit dlls since i need the reference. I know i can use reflection but then i will have to write a wrapper for it. This could get tedious. Your solution would be great if i had to include something based on conditions. I could also use the build tab pre build events for the inclusion i believe. Thanks. I am still waiting for the answers to this problem through other ways :)!
Kornfeld Eliyahu Peter 2-Feb-16 2:26am    
An other idea - much simpler - is to create two solutions for 64 and 32, that share the source files, but have different set of references...
Da-broken-Breakpoint 3-Feb-16 4:14am    
Hi Kornfeld,
Yes, we currently are doing the same thing. However if we do manage to roll in a change set, we need to verify and test the change on two different solutions and then check them both on different environments! That is why i am trying to bring them both into a single solution file which would conditionally use the libraries. Your solution works for swapping out the reference. Thanks for that! I am stuck with another issue now though. This is something i'll ponder about for a while i guess.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900