I am pretty new to Visual Studio.. Couldn't find similar topic so starting the new one.
I'm developig an MFC app and I'd like to use mySQL database engine.
I believe I have followed instructions from the official site to install the C++ connector:
Building Connector/C++ Applications: General Considerations and
Building Connector/C++ Applications on Windows with Microsoft Visual Studio
i.e:
I downloaded c++ connector (together with mySQL database engine)
I chose to link dynamically against precompiled (by Oracle) c++ connector
which means I need : LIB/vs14/mysqlcppconn8.lib (import library), LIB/mysqlcppconn8-1-vs14.dll
I selected debug mode in my configuration (according to the official docs I can do it even though the library itself may be compiled in release mode)
I added Additional Include Directories (Compiler->General) - which in my case is: "C:\Program Files\MySQL\Connector C++ 8.0\include" - this is where mysqlx/xdevapi.h resides
I added Additional Library Directories (Linker->General) - which in my case is: "C:\Program Files\MySQL\Connector C++ 8.0\lib64"
I added Additional Dependencies (Linker->Input) which in my case is mysqlcppconn8.lib (static import lib for the dll)
I changed option for Runtime Library (C++ -> Code Generation) from MDd to MT (as suggested in the documentation)
I extended the PATH env variable by adding the directory where the actual dll library is located (in my case the location of the file is C:\Program Files\MySQL\Connector C++ 8.0\lib64\mysqlcppconn8-1-vs14.dll so the path is C:\Program Files\MySQL\Connector C++ 8.0\lib64)
In the wizard-generated MFC project I added #include and I get following error: fatal error C1083: Cannot open include file: 'mysqlx/xdevapi.h': No such file or directory
I'm wondering what is causing this since I have added Include search path in step 4.
The directory structure for the library is as follows:
C:\Program Files\MySQL\Connector C++ 8.0\include\mysqlx\xdevapi.h
C:\Program Files\MySQL\Connector C++ 8.0\lib64\mysqlcppconn8-1-vs14.dll
C:\Program Files\MySQL\Connector C++ 8.0\lib64\vs14\mysqlcppconn8.lib
The complier command:
/Yu"stdafx.h" /GS /analyze- /W3 /Zc:wchar_t /I"C:\Program
Files\MySQL\Connector C++ 8.0\include\mysqlx" /I"C:\Program
Files\MySQL\Connector C++ 8.0\include" /ZI /Gm /Od /sdl
/Fd"Debug\vc141.pdb" /Zc:inline /fp:precise /D "WIN32" /D "_WINDOWS" /D
"_DEBUG" /D "_UNICODE" /D "UNICODE" /D "_AFXDLL" /errorReport:prompt /WX-
/Zc:forScope /RTC1 /Gd /Oy- /MT /Fa"Debug\" /EHsc /nologo /Fo"Debug\"
/Fp"Debug\exam-questions.pch" /diagnostics:classic
The linker command:
/OUT:"C:\Users\Kamilek\source\repos\exam-questions\Debug\exam-
questions.exe" /MANIFEST /NXCOMPAT
/PDB:"C:\Users\Kamilek\source\repos\exam-questions\Debug\exam-
questions.pdb" /DYNAMICBASE "mysqlcppconn8.lib" /DEBUG:FASTLINK
/MACHINE:X86 /INCREMENTAL /PGD:"C:\Users\Kamilek\source\repos\exam-
questions\Debug\exam-questions.pgd" /SUBSYSTEM:WINDOWS
/MANIFESTUAC:"level='asInvoker' uiAccess='false'"
/ManifestFile:"Debug\exam-questions.exe.intermediate.manifest"
/ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"C:\Program Files\MySQL\Connector
C++ 8.0\lib64\" /TLBID:1
Related
I downloaded the source code for a library that resembles the processing library but for c++ called libxd. I used CMake to generate project files for Visual Studio 2019 which worked successfully. When trying to compile the solution for all of the provided build modes, I get the following errors:
The first error invlaid numeric argument '/Wno-narrowing' is what I'm concerned about for now. I'm trying to figure out why this argument is being provided to the compiler. When looking in the properties window for the xd project in the solution I can see the command line arguments that are supposed to be provided to the compiler in the C/C++ > Command Line tab. I verified that there is no /Wno-narrowing option provided. When looking at the build output it can be seen that the option -Wno-narrowing is being provided to the compiler. Can someone help me figure out why this argument is being passed? I looked throughout the compiler properties window to see if I could see anything that would be affecting it but I can't see anything that would affect this.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX64\x64\CL.exe /c /IC:\dev\libxd\include /IC:\dev\libxd\lib\glad\include /IC:\dev\libxd\lib\glm /IC:\dev\libxd\lib\stb\include /IC:\dev\libxd\lib\glfw\include /Zi /nologo /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"xd.dir\Debug\\" /Fd"xd.dir\Debug\xd.pdb" /Gd /TP /errorReport:prompt -Wno-narrowing C:\dev\libxd\src\opensans.cpp
Tracking command:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Tracker.exe /d "C:\Program Files (x86)\MSBuild\15.0\FileTracker\FileTracker32.dll" /i C:\dev\libxd\build\xd.dir\Debug\xd.tlog /r C:\DEV\LIBXD\SRC\OPENSANS.CPP /b MSBuildConsole_CancelEventfa83e1bb599743cfa0c02eb67d579e28 /c "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX64\x64\CL.exe" /c /IC:\dev\Users\olive\Downloads\libxd\include /IC:\dev\libxd\lib\glad\include /IC:\dev\libxd\lib\glm /IC:\dev\libxd\lib\stb\include /IC:\dev\libxd\lib\glfw\include /Zi /nologo /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"xd.dir\Debug\\" /Fd"xd.dir\Debug\xd.pdb" /Gd /TP /errorReport:prompt -Wno-narrowing C:\dev\libxd\src\opensans.cpp
cl : command line error D8021: invalid numeric argument '/Wno-narrowing'
The command exited with code 2.
The error is caused because that's not a valid MSVC flag. The flag is there because the CMakeLists.txt file demands it:
set_source_files_properties(src/opensans.cpp PROPERTIES COMPILE_FLAGS -Wno-narrowing)
That project specifies what it supports for building under Windows and it's not MSVC.
Windows Prerequisites: mingw-w64 version >= 4.8.1
So you either need to build it in the supported way, or modify the build scripts to allow for MSVC.
That would entail figuring out what the flag does in gcc (disables diagnostic messages about narrowing issues) and finding the equivalent in MSVC, probably a /disable:nnnn variant, once you figure out the nnnn. Figuring that out should be relatively painless since MSVC will tell you that when you compile it - lots of Cnnnn - something to do with narrowing warning messages.
Or you could just disable the line that adds the flag (for MSVC builds only) and see if it still builds. Of course, in the spirit of open source, you should then notify the author what it took to get it going, they may be happy to support MSVC if the effort is not too high.
I am getting an error LNK1104 in Visual Studio :
LNK1104 cannot open file './x64/Release/zlib.lib'
when compiling my project.
The point is that I cannot see a corresponding path defined in Additional Dependencies of the linker in the project properties.
The error is shown when I add to the list of dependencies the right path to the zlib.lib or when I remove it.
here are the project compilation cmd line and linker :
/Yu"stdafx.h" /GS /GL /W3 /Gy /Zc:wchar_t /Zi /Gm- /O2 /sdl /Fd"C:\Users\me\Documents\Visual Studio 2015\Projects\AnalysePMDSurf\PMDFilter\temp\Release\vc140.pdb" /Zc:inline /fp:precise /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /Gd /Oi /MD /Fa"C:\Users\me\Documents\Visual Studio 2015\Projects\AnalysePMDSurf\PMDFilter\temp\Release\" /EHsc /nologo /Fo"C:\Users\me\Documents\Visual Studio 2015\Projects\AnalysePMDSurf\PMDFilter\temp\Release\" /Fp"C:\Users\me\Documents\Visual Studio 2015\Projects\AnalysePMDSurf\PMDFilter\temp\Release\PMDFilter.pch"
and
/OUT:"C:\Users\me\Documents\Visual Studio 2015\Projects\AnalysePMDSurf\PMDFilter\bin\Release\PMDFilter.exe" /MANIFEST /LTCG:incremental /NXCOMPAT /PDB:"C:\Users\me\Documents\Visual Studio 2015\Projects\AnalysePMDSurf\PMDFilter\bin\Release\PMDFilter.pdb" /DYNAMICBASE "C:\Users\me\Documents\Visual Studio 2015\Projects\AnalysePMDSurf\opennurbs_20130711\bin\Release\opennurbs.lib" "C:\Users\me\Documents\Visual Studio 2015\Projects\AnalysePMDSurf\opennurbs_20130711\zlib\bin\Release\zlib.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /OPT:REF /INCREMENTAL:NO /PGD:"C:\Users\me\Documents\Visual Studio 2015\Projects\AnalysePMDSurf\PMDFilter\bin\Release\PMDFilter.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"C:\Users\me\Documents\Visual Studio 2015\Projects\AnalysePMDSurf\PMDFilter\temp\Release\PMDFilter.exe.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /TLBID:1
Not sure, but have you tried two "\" instead one "\"?
Also, some of those errors might be Linker Tools Error LNK1104:
Not enough disk space.
File does not exist.
When specifying libraries in a project's property pages dialog box,
library names should be separated by spaces (and not commas).
Incorrect filename or path.
Invalid drive specification.
Insufficient file permissions.
Path for filename expands to more than 260 characters.
If the given file is named LNKn, which is a filename generated by the
linker for a temporary file, the directory specified in the TMP
environment variable may not exist, or more than one directory is
specified for the TMP environment variable. Only one directory path
should be specified for the TMP environment variable.
If the error message occurs for a library name, and you recently
ported the .mak file from a previous Microsoft Visual C++ development
system, the library may no longer be valid. Ensure that the library
still exists in this circumstance.
Another program may have the file open and the linker cannot write to
it.
Incorrect LIB environment variable. For information on how to update
the LIB environment variable, see VC++ Directories Property Page .
Make sure any directories with libraries you need are listed here.
Well I could solve it that way : create a new solution and new projects, copy-paste all the code files. Set the linking for the new projects and everything's fine.
i'm trying to switch from a large Visual Studio-based project (with static, dynamic libraries, executables) to CMake. It would work well, but as many of the static libraries have export libraries (without the need of linking the library to the project), i need a way to include project's interfaces only without linking the static library.
Situation:
CMakeLists.txt
cmake_minimum_required(VERSION 3.0)
project(Test)
add_subdirectory(Projekt_B)
add_subdirectory(Projekt_A)
Projekt_A/CMakeLists.txt
add_library(Projekt_A
libraryContent.cpp
libHeader.h
libInterfaceOnly.h)
target_include_directories(Projekt_A PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
# could be **INTERFACE** as well
Projekt_B/CMakeLists.txt
add_library(Projekt_B_Public SHARED
libraryContentB.cpp
libHeaderB.h
)
add_library(Projekt_B_Private SHARED
libraryContentB.cpp
libHeaderB.h
)
add_library(Projekt_B_Interface SHARED
libraryContentB.cpp
libHeaderB.h
)
## this Line works but links Projekt_A
target_link_libraries(Projekt_B_Public PUBLIC Projekt_A)
## this Line works too, but links Projekt_A to it without passing them on
target_link_libraries(Projekt_B_Private PRIVATE Projekt_A)
## this Line works **only** if no interface of A is used in B
target_link_libraries(Projekt_B_Interface INTERFACE Projekt_A)
So, all targets compile when no interface of Projekt_A was used in Projekt_B_. When I include a header (which has been exported via traget_include_directories), Projekt_B_Interface won't link anymore.
MsBuild tells for Projekt_B_Interface:
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\CL.exe
/c /Zi /nologo /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D
"CMAKE_INTDIR=\"Debug\"" /D Projekt_B_Interface_EXPORTS /D _WINDLL /D
_MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope
/Fo"Projekt_B_Interface.dir\Debug\\"
/Fd"Projekt_B_Interface.dir\Debug\vc120.pdb" /Gd /TC /errorReport:queue
D:\Develop\CMake\TEST\Projekt_B\libr.c
libr.c
D:\Develop\CMake\TEST\Projekt_B\libr.c(2): fatal error C1083: Cannot open include file:
'libinc.h': No such file or directory
[D:\Develop\CMake\TEST\build\Projekt_B\Projekt_B_Interface.vcxproj]
Within the other Projekt_B_* projects it's successfull:
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\CL.exe
/c /ID:\Develop\CMake\TEST\Projekt_A /Zi /nologo /W3 /WX- /Od /Ob0 /D
WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\""
/D Projekt_B_Public_EXPORTS /D _WINDLL /D _MBCS /Gm- /RTC1 /MDd /GS
/fp:precise /Zc:wchar_t /Zc:forScope /Fo"Projekt_B_Public.dir\Debug\\"
/Fd"Projekt_B_Public.dir\Debug\vc120.pdb" /Gd /TC /errorReport:queue
D:\Develop\CMake\TEST\Projekt_B\libr.c
libr.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\link.exe
/ERRORREPORT:QUEUE /OUT:"D:\Develop\CMake\TEST\build\
Projekt_B\Debug\Projekt_B_Public.dll" /INCREMENTAL /NOLOGO
kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
..\Projekt_A\Debug\Projekt_A.lib /MANIFEST
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG
/PDB:"D:/Develop/CMake/TEST/build/Projekt_B/Debug/Projekt_B_Public.pdb"
/SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT
/IMPLIB:"D:/Develop/CMake/TEST/build/Projekt_B/Debug/Projekt_B_Public.lib"
/MACHINE:X64 /machine:x64 /debug /DLL Projekt_B_Public.dir\Debug\libr.obj
Projekt_B_Public.vcxproj -> D:\Develop\CMake\TEST\build\Projekt_B\Debug\
Projekt_B_Public.dll
Any ideas how I could get something like:
target_compile_libraries(Projekt_B HEADERS Projekt_A)
(something that target_include_directoies would sound like...)
I think I've found a solution for this situation (without the need of settings vars in CMake):
Projekt_A/CMakeLists.txt:
...
# create a interface
add_library(IProjekt_A INTERFACE)
# add *export* headers to interface
target_include_directories(IProjekt_A INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
# bind interface to project itself (just in case)
target_link_libraries(Projekt_A INTERFACE IProjekt_A)
Projekt_B/CMakeLists.txt
...
# this will add includes *only* and reexports them within Projekt_B
target_link_libraries(Projekt_B PUBLIC IProjekt_A)
# this will add includes and library for link and reexport
target_link_libraries(Projekt_B PUBLIC Projekt_A)
# this will only add the includes for *this* project
target_link_libraries(Projekt_B PRIVATE IProjekt_A)
This makes it possible to export the headers in the build environment. Very usefull in large projects.
I'll hope it helps someone else either!
Cheers.
Hi i wanted to use external library in my project so i downloaded sourcode from https://code.google.com/p/inih/ and i compiled it using Microsoft walkthrough http://msdn.microsoft.com/en-us/library/ms235627.aspx
Build started 16/01/2015 10:30:39.1>Project "c:\...\Projects\inihlib\inihlib\inihlib.vcxproj" on node 2 (Build target(s)).
1>ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /sdl /O2 /Oi /Oy- /GL /D WIN32 /D NDEBUG /D _LIB /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Release\\" /Fd"Release\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt ...\INIReader.cpp
INIReader.cpp
Lib: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\Lib.exe /OUT:"c:\...\Projects\inihlib\Release\inihlib.lib" /NOLOGO /LTCG Release\INIReader.obj
inihlib.vcxproj -> c:\...\Projects\inihlib\Release\inihlib.lib
1>Done Building Project "c:\...\Projects\inihlib\inihlib\inihlib.vcxproj" (Build target(s)).
Build succeeded.
Time Elapsed 00:00:00.46
It looks like inihlib.lib should be in release folder but instead ive got only inih.obj and log file. What im doing wrong any ideas?
Question was answered by Shane; issue was simply looking in the wrong folder.
You might be looking in the wrong folder, you could be looking in c:...\Projects\inihlib\inihlib\Release
instead of
c:...\Projects\inihlib\Release? – Shane Haw 1 hour ago
Just copy-pasting this for people who come looking for an accepted answer.
I have an MFC solution with 17 sub-projects. I just recently added another dll project and cannot get the executable to link to the renamed version of the library. In the settings for the dll projects in the solution, debug builds all have a 'D' appended to the output name to signify that it's the debug version. In some cases, we do that by changing the TargetName to $(ProjectName)D, and in other cases a post build event copies it from the build directory to the lib directory and renames it appending the 'D'. For this project, when I compile the dll I get the two files as expected: MultiLangD.lib and MultiLangD.dll. This is the linker command line for the dll project:
/OUT:".\Debug\MultiLangD.dll" /NOLOGO /DLL /MANIFEST
/ManifestFile:".\Debug\MultiLangD.dll.intermediate.manifest" /ALLOWISOLATION
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG
/PDB:"C:\WorkSpaces\WorkSpace_CFFT_II_i18n\CFFT_i18n_MBCS\CFFT\MultiLang\Debug\MultiLangD.pdb"
/PGD:"C:\WorkSpaces\WorkSpace_CFFT_II_i18n\CFFT_i18n_MBCS\CFFT\MultiLang\Debug\MultiLangD.pgd"
/TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\Debug\MultiLangD.lib" /MACHINE:X86
/ERRORREPORT:QUEUE
This is the compiler command line for the dll project:
/ZI /nologo /W3 /WX- /Od /Oy- /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_AFXEXT" /D
"_MULTILANGDLL" /D "_CRT_SECURE_NO_WARNINGS" /D "_WINDLL" /D "_MBCS" /D "_AFXDLL" /Gm
/EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR- /Yu"StdAfx.h"
/Fp".\Debug\MultiLangD.pch" /Fa".\Debug\" /Fo".\Debug\" /Fd".\Debug\vc100.pdb" /Gd
/analyze- /errorReport:queue
In the executable project I list MultiLangD.lib as an additional dependency to the linker, set "Link Library Dependencies" to no, and "Use Library Dependency Inputs" to yes. The MultiLang dll project is not set as a project dependency to the executable. Nevertheless, in the debug build, I get an error because the linker cannot find MultiLang.lib. This is the linker command line of the executable project:
/OUT:".\Debug\WinGFApp.exe" /INCREMENTAL /NOLOGO /LIBPATH:"..\Lib"
/LIBPATH:"..\Student\lib" /LIBPATH:"C:\Program Files (x86)\Microsoft DirectX SDK (March 2009)\Lib\x86"
"MultiLangD.lib" "datastored.lib" "shlwapi.lib" "ws2_32.lib" "MdxReadd.lib" "winmm.lib"
"dxguid.lib" "dxerr9.lib" "dinput8.lib" "Messagingd.lib" "dtccd.lib" "Version.lib"
"SerialTCIMD.lib" "geosrvdll.lib" "NetworkUIDMD.lib" "amp2.lib" "idmmib.lib"
"vmfr2.lib" "d3dx9.lib" "comsuppwd.lib" "vmf_net_db.lib" "jvmfd.lib"
/NODEFAULTLIB:"libc" /NODEFAULTLIB:"libcd" /NODEFAULTLIB:"libci" /MANIFEST
/ManifestFile:".\Debug\WinGFApp.exe.intermediate.manifest" /ALLOWISOLATION
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:".\Debug/CFFTInstrD.pdb"
/SUBSYSTEM:WINDOWS
/PGD:"C:\WorkSpaces\WorkSpace_CFFT_II_i18n\CFFT_i18n_MBCS\CFFT\Instructor\Debug\WinGFApp.pg
d" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE
This is the compiler command line:
/I"." /I"..\Instructor\csw" /I"..\Instructor\CFFTInstr" /I"..\Student\common"
/I"..\Student\Messaging" /I"..\Student\geotrans" /I"..\SerialTcim" /I"..\AudioServer"
/I"..\NetworkUIDM\UIDM_Include" /I"..\NetworkUIDM\UIDM_JVMF" /I"..\NetworkUIDM"
/I"..\Instructor\cas" /I"..\Jvmf" /I"..\Instructor\JvmfGui" /I"..\Instructor\JvmfCff"
/I"..\NLOS" /I"C:\Program Files (x86)\Microsoft DirectX SDK (March 2009)\Include" /Zi
/nologo /W3 /WX- /Od /Oy- /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "NO_MSGS" /D
"INSTRUCTOR" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES"
/D "_CRT_NONSTDC_NO_DEPRECATE" /D "_VC80_UPGRADE=0x0600" /D "_MBCS" /Gm- /EHsc /RTC1
/MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yu"stdafx.h" /Fp".\Debug/WinGFApp.pch"
/Fa".\Debug/" /Fo".\Debug/" /Fd".\Debug/" /FR".\Debug\" /Gd /analyze-/errorReport:queue
When I open the .vcxproj file in np++ and search for MultiLang.lib it only appears as a dependency in the release build, while in the debug build settings MultiLangD.lib is listed. This is the debug settings ItemDefinitionGroup node from the .vcxproj file:
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Debug/WinGFApp.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.;..\Instructor\csw;..\Instructor\CFFTInstr;..\Student\common;..\Student\Messaging;..\Student\geotrans;..\SerialTcim;..\AudioServer;..\NetworkUIDM\UIDM_Include;..\NetworkUIDM\UIDM_JVMF;..\NetworkUIDM;..\Instructor\cas;..\Jvmf;..\Instructor\JvmfGui;..\Instructor\JvmfCff;..\NLOS;C:\Program Files %28x86%29\Microsoft DirectX SDK %28March 2009%29\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;NO_MSGS;INSTRUCTOR;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>.\Debug/WinGFApp.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
<ObjectFileName>.\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>MultiLangD.lib;datastored.lib;shlwapi.lib;ws2_32.lib;MdxReadd.lib;winmm.lib;dxguid.lib;dxerr9.lib;dinput8.lib;Messagingd.lib;dtccd.lib;Version.lib;SerialTCIMD.lib;geosrvdll.lib;NetworkUIDMD.lib;amp2.lib;idmmib.lib;vmfr2.lib;d3dx9.lib;comsuppwd.lib;vmf_net_db.lib;jvmfd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>..\Lib;..\Student\lib;C:\Program Files %28x86%29\Microsoft DirectX SDK %28March 2009%29\Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>libc;libcd;libci;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>.\Debug/CFFTInstrD.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>Debug/CFFTInstrD.bsc</OutputFile>
</Bscmake>
<PostBuildEvent>
<Message>Copy Executable</Message>
<Command>if not exist ..\exec mkdir ..\exec
copy debug\WinGFApp.exe ..\exec\CFFTInstrD.exe
</Command>
</PostBuildEvent>
<ProjectReference />
<ProjectReference>
<UseLibraryDependencyInputs>true</UseLibraryDependencyInputs>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
Unfortunately, all the executables and dlls generated are copied to a single directory as post build events, so I have to follow the "append D" naming convention to avoid overwriting artifacts from other builds. I'm not sure why none of the other dll projects in the build have this problem. I am obviously missing something here but cannot figure out what it is. Can someone please enlighten me on what I'm doing wrong and how to accomplish this. Thanks.
EDIT
I forgot to mention that I have also tried adding a reference to the project in Common Properties->Framework and References.
Also, while the compilation is under way I see Automatically linking with MultiLang.lib scroll by.
Ok, I got it working. I removed the reference and set Linker->General->Ignore Import Library to Yes. I left everything else the same and now it compiles and links just fine.