I open up the VS 2008 solution of the library in VS 2010 and it automatically converts it. Then I build under Debug DLL, Release DLL. But this only gives me the .dll files and incremental linker files (.ilk). How do I get the corresponding .lib files for the .dll's?
They should be under the intermediate directory. Check project properties (Configuration Properties -> General) to see where it is
Related
Generating a visual studio .sln from cmakelists.txt with cmake standalone, the sln contains and uses the cmakelists.txt, could it be possible to remove or freeze it in order to obtain a sln that works with vs prior to vs 2017.
My situation is that the sln generated by cmake for vs 2019 compiles, (it contains cmakelists.txt) but generating for vs 2008 won't compile, could it be thinkable to convert the working vs 2019 sln to vs 2008, i.e. removing cmakelists.txt and somehow converting to vs 2008 make files ?
update : in case anyone else in the same situation, what I resorted to do was to extract the "PreprocessorDefinitions" from the cmake generated vs2019 .vcxproj, and put them in a vs2008 .vcproj, however I don't think that was the problem really because that particular cmakelists.txt and C sources allows vs2008, it seems it's C11 C code not C89 like vs2008
I have a dll project that was created in VC++ 2008. The released dll file after building this project in VS 2008 is 299kB.
But, when I convert the project to VC++ 2010, the size of the output dll grows significantly!!! (1643kB !!!)
Why is the output dll file generated by Visual Studio 2010 so much larger?
Are there any settings in Visual Studio 2010 which I could edit, to get a smaller output file released?
The /MT flag means you're statically linking in the C runtime library.
Presumably, in your previous project in VS 2008, you were dynamically linking to the runtime library, which will make the output file smaller because it doesn't have to embed all of the required functionality from the C runtime library in your DLL.
The fix is simple, just change the setting to /MD. Dynamic linking is much preferred anyway.
I'm using an open source Mozilla project in Visual C++ 2010. The project requires UNIX based build tools and therefore I cannot create a Visual Studio project for it directly. I must use the command line build files (makefile, configure script, etc) bundled with the project to build the project using cl.exe. (This is due to the fact that some .h files are generated by the make utilities.)
The problem is, without creating a Visual Studio project, how do I browse through the project source files using say the "F12 Go To Definition" feature available in Visual Studio? I know I can generate a .bsc file using the /FR compiler option. But, I also found that the Object Browser in Visual Studio 2010 doesn't seem to support a .bsc file. When I open a .bsc file directly using Visual Studio 2010, it says "Class not registered, Looking for object with CLSID: {D9B3211D-E57F-4426-AAEF-30A806ADD397}.
How do we use a .bsc file under Visual Studio 2010?
Unfortunately BSC is not supported anymore for Visual Studio 2010+
More details: http://connect.microsoft.com/VisualStudio/feedback/details/514470/bsc-files-cannot-be-used
I'm working on a solution that was developed under vs2008 but was opened and converted to vs2010. I was only given the vs2010 solution so I have to work under vs2010.
Is their a way to build this solution under vs2010 without using any of the vs2010 libs (Microsoft Visual Studio 10.0\VC\libs) and use only those used by vs2008
In Linker > General> Additionnal Library Directories, I've already added a link to the vs2008 libs folder.
You can change the "General > Platform Toolset" property in the Visual Studio 2010 project properties to specify which version MSBuild should use to build your project. The default value is v100, but setting it to v90 would use Visual Studio 2008. This modifies your PATH, BIN, and LIB directories before compiling/linking, so you don't have to change any directory settings manually.
I think, by default only v100, v90, and Windows7.1SDK are supported, but there are tools available to target older Visual Studio versions as well.
See e.g. http://blog.iangoodsell.com/2010/04/visual-studio-2010-and-platform-toolset.html.
I have a C++/CLI app that is built under Visual Studio 2010 but using .Net 3.5. As required, I hand edited my project file to add the TargetFrameworkVersion with a value of 3.5 and was able to build it without issue when I was in x86 (32-bit) mode. However, when I switched to build it in x64 (64-bit) mode, I got the following error:
error MSB8014: Execution path (C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\x86_amd64) could not be found.
I do have VS 2008 (9.0) installed, but there is no x86_amd64 directory under the bin folder. I tried fooling it by adding this folder (and the amd64 folder which would have failed thanks to the next line in the targets file), and then I got the error:
fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
which I can't figure out because my project has no explicit links. I switched the C# assemblies that it interacts with to build in x64 (as opposed to any CPU) but to no avail.
FYI: Everything builds correctly in 32-bit mode. Everything also build correctly in 64 bit mode if I switch to .Net 4.0 (v100). I get the same errors building in both release and debug mode.
Any ideas would be appreciated.
If you are compiling with the "toolset" changed over from V100 to V90 on the project properties, and you have Visual Studio 2008 installed on the same development machine, just go to Control Panel, Programs and Features, select Visual Studio 2008, right-click, select Uninstall/Change, then select to add/remove f eatures, then when you are presented with a list of features, look for x64 compiler/files under Visual C++ which is not installed by default,but by clicking on the checkbox next to it, it will add the needed files.
In VS2010 it should link to C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64
You probably got configuration wrong, or imported from a vs2008 project.
Go to Configuration -> General -> Platform Toolset. make sure it's v100 (vs2010)
If that doesn't help , look at Configuration -> VC++ Directories. That's where that path is set.
You can see that it looks in $(VCInstallDir) which in your computer is set to the VS2008 path.