Click here to Skip to main content
15,077,494 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Experts,

I have certain issues in dll referrencing. Can anyone help me on this.?
1. I have reference debug dll in debug mode and same for release
2. But in Configuration properties->Linker->Command Line, I am getting release reference in debug mode.

Below properties set in debug mode:

</OUT:"Debug/MediaConvertD.dll" /INCREMENTAL /NOLOGO /LIBPATH:"..\APIHook\Debug" /LIBPATH:"C:\Program Files (x86)\Matrox DSX.sdk\lib\x32\debug" /LIBPATH:"C:\Program Files (x86)\Matrox DSX.sdk\lib\debug" /LIBPATH:"C:\Program Files (x86)\Matrox DSX.sdk\lib\VS2010\32\Debug" /LIBPATH:"c:\Program Files (x86)\Matrox DSX.sdk\Lib\VS2010\32\Debug" /DLL "strmbasd.lib" "wmvcore.lib" "strmiids.lib" "quartz.lib" "winmm.lib" "olepro32.lib" "dsound.lib" "dxguid.lib" "mpgvout.lib" "vfw32.lib" "mpegin.lib" "ws2_32.lib" "gdiplus.lib" "Ddraw.lib" "mcdvd_32.lib" "DGFstMovD.lib" ".\MXF\BSSMXFLib\Debug\BSSMXFLibD.lib" "mvColorCorrectionHelperPublic.lib" "mvCOMPublic.lib" "mvfFlexApiPublic.lib" "mvUtilityPublic.lib" "C:\Project\NativeLibs\MediaConvert\MXF\BSSMXFLib\Release\BSSMXFLib.lib" /DEF:".\MediaConvertD.def" /MANIFEST /ManifestFile:".\Debug\MediaConvert.dll.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:".\Debug/MediaConvertD.pdb" /PGD:"C:\CompanyProjects\BroadStream\NewSVN\branches\BS-6941_\Debug\MediaConvert.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\Debug/MediaConvertD.lib" /MACHINE:X86 /ERRORREPORT:QUEUE  >


Please take a look on below line of above properties

C:\Project\NativeLibs\MediaConvert\MXF\BSSMXFLib\Release\BSSMXFLib.lib

I have set above properties in debug mode, but it is taking the reference of release library.

Please help me to resolve this...Sorry for my English.

Thanks and Regards

Vaibhav
Posted
Updated 11-Jun-15 22:17pm
v3
Comments
KarstenK 12-Jun-15 4:37am
   
review your settings. Somewhere is it set. Delete it!

1 solution

Looks like somewhere you have a reference to the absolute path of that lib. There's three ways I can think of where it could originate from, if it is from somewhere in your own dll:

1. somewhere you forced an include using
#pragma comment(lib, "C:\Project\NativeLibs\MediaConvert\MXF\BSSMXFLib\Release\BSSMXFLib.lib")
Search your header files for this #pragma

2. it may be in your project settings:
Check your project properties, switch to Linker->input, look at the entry "Additional Dependencies". you can click the drop down button at the right edge of that field to get a better view and edit the entries.

3. it may be inherited from the defaults. This is a bit tricky, as the default directories were moved in VS 2010 and are not easy to access. Follow these steps:
- using the menu, select View->Property Manager (not Property pages!)
- you'll see a tree view listing all the projects in your solutions. Select any of these projects and click the little triangle to the left to open the list of configurations (usually two entries: "Debug | Win32" and "Release | Win32")
- click on the triangle of your Debug configuration to open the list of property files affecting the defaults of this config: you'll probably see a list of 4 entries.
- right-click the entry called "Microsoft.Cpp.Win32.user", and select "Properties" from the context menu
- In the properties dialog, got to Common Properties->Linker->Input. On the right side you will now see all the default paths and files that are used for all projects using this configuration.

Note: if you find that release entry in the property files, you can change it, but there is no obvious way to save your changes! To save, you need to close the solution, and it may also be a good idea to even close VisualStudio. When you do that, you will be prompted to save the changes to these property sheets. Confirm.

P.s. - important!:
Another note regarding changes to the Microsoft.Cpp.Win32.user property page: when you open your other projects and configurations, you'll find that all of them include this same property page, so changes to this page will affect all configurations! You can avoid this by adding (a) new property sheet(s) to the configuration(s) you want to change. Feel free to ask if you need more help with that.
   
v3

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