How to build CppUnit with Visual Studio 2010 - visual-studio-2010

I am trying to build CppUnit (first line in ReadMe says version 1.13) with Visual Studio 2010. Following the instructions (found on web forums, couldn't find much in CppUnit documentation); I cannot find a valid file extension. All file extensions end with ",v" what is this weird ",v" extension and what is the purpose of it?
I am frustrated at this point, if someone can help with how to load CppUnit in VS2010 project and build it....that would be a great help !

Are you referring to this project?
http://sourceforge.net/projects/cppunit
If so, use TortoiseSVN for example to get the latest code from svn:
https://cppunit.svn.sourceforge.net/svnroot/cppunit
It contains "INSTALL-VS.Net2008.txt" with instructions for Visual Studio 2008 but it can also be applied to Visual Studio 2010.
You may have to edit src\msvc6\testrunner\MsDevCallerListCtrl.cpp and replace
version("9.0")
with
version("10.0")
You can safely ignore any build errors as long as the sln outputs cppunit(d).lib or whichever dependencies you need.
Have fun! :)

I've successfully converted CPPUNIT 1.12.1 to be a VS2010 solution. It's described here: http://blogs.powersoft.ca/erict/archive/2012/02/21/cppunit-in-vs2010ndashwith-a-sample.aspx and the solution can be downloaded from there.

I just found a version which is really easy to build in VS2010(aka push 1 button):
http://www.comp.nus.edu.sg/~cs3215/tools/cppunitAll.html
It's really nice because it has a .sln file which you can open directly. Also it includes a tutorial ;)
Found it with google.de
It's version 1.12.1
Have fun!

Related

How do I open up the Chromium source code as a project within Visual Studio Community?

I have followed the instructions here (https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md) to download the Chromium source code. It took about an hour! I understand how, "Chromium uses Ninja as its main build tool along with a tool called GN to generate .ninja files." Basic newbie question: How do I open up the Chromium source code as a project within Visual Studio Community? Also, is there anyway to do the build from within Visual Studio? Thx in advance!

How to build LLVM-<current-version>.dll with Visual Studio

Following the instructions here,
I've installed prerequisites, downloaded the source for version 3.9 and had CMake generate LLVM.sln. Building the full solution takes some times, but seems to do what it's supposed to do.
When looking at get_library in bindings/python/llvm/common.py, the Python binding makes use of a file named "LLVM-<current version>.dll" but I can't find any "LLVM-3.9.dll" in the generated files.
How do I build LLVM-3.9.dll from source with Visual Studio?
You can check out my repository which is based on CRoger instructions and simply build the project LLVM.vcxproj in Visual Studio.

OpenCV & Microsoft Visual Studio 2012 ( for x64 )

I have been trying to run OpenCV through MVS 2012 with no succeess.
Here is an error i get:
1>LINK : fatal error LNK1104: cannot open file 'opencv_core242d.lib' 1> 1>Build FAILED.
Could someone provide me a tutorial? or how can i solve this problem?
I've written a blog post on Using OpenCV 2.4.2 with Visual Studio 2012 on Windows 7 (64-bit). With the step by step instructions provided, I think it should be pretty easy for you to get it done. Feel free to comment if you have any doubts.
Since OpenCV 2.4 does not work well with Visual Studio 2012. I think that's why you always got problems. Actually, it used me a lot of time to make all things work. So I wrote a very simple tutorial about how to use OpenCV 2.43 in Visual Studio 2012. Please check it. Good luck. If you still have questions, ask me again.
http://answers.opencv.org/question/6495/visual-studio-2012-and-rtlfreeheap-error/#6603
Some basic steps...
use cmake to create the .sln or the solution file ...make sure you choose right the compiler in cmake properly...use the address of the cmake file (CMakelist.txt) in the folder containing opencv files..
click on the .sln file (this will be found in the target folder whose path you have set in cmake to contain the build..) and open with VS2012
VS2012 will build your libraries and dlls...add the path of the dlls to the system variable PATH...put the path of the libs in the IDE..and the include files also..
restart VS2012 to make the changes in PATH variable to reflect
You have 2 options - one is to use the precompiled libraries and link them into your VS2012 projects.
The other is to use CMake to make the the right .SLN and .PRJX files so you can simply open them .SLN in VS2012 and compile everything for yourself.
Both have been discussed here, however, to add to the first option, you need to manually edit the top level CMAKElist.txt file with the following lines
if( MSVC ) # VS2012 doesn't support correctly the tuples yet
add_definitions( /D _VARIADIC_MAX=10 )
endif()
Before generating your solution files. This ensures that you don't have problems with the VARIADIC length issue with :tuple - which Visual studio 2012 has issues with.
there may be 2 option to solve your error:
1) You may use opencv 2.4.2 that may have some problems to connect with visual studio 2012
so use newer version of opencv
2) You need to restart your visual studio 2012 so that it can reconfigure its Setting as per requirements.

"Exception has been thrown by the target of an invocation." when building a Visual Studio 2010 VSPackage

I recently create a couple of VSPackages for some Visual Studio extensions (menu bar/command). I compiled them correctly yesterday, checked into TFS (i'm the only one touching this project, FYI). I had already installed these extensions and were working fine. Today it doesn't compile! I get the following error:
Exception has been thrown by the target of an invocation.
This doesn't tell me anything, so i fired up Visual Studio with the following command:
devenv.exe /Rebuild > out.log
In my out.log, I see the following:
C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets(420,5): error : Exception has been thrown by the target of an invocation.
I have been stuck on this for hours and can no longer build these VSPackages. Anyone? This is really frustrating. I have already tried cleaning project/rebuilding/build using Visual Studio itself (not command line)
I've experienced this issue several times in both vs2010 and vs2012, and manually deleting the "bin" and "obj" folders from the project then doing a "rebuild" normally does the trick.
Further to the answer provided by the OP, I will provide it here for completeness instead of relying on the external link remaining live:
Quoted directly from the MSDN forum answer:
Do you happen to have these extensions installed to the AllUsers
location (i.e. %VSInstallDir%\Common7\IDE\Extensions)?
You mentioned in your initial post that "I had already installed these
extensions and were working fine."
The task that's failing (based on the line number in the targets file)
is the UninstallExtension task. The only reason I'm thinking this task
would execute and fail in your situation is if you're building an
extension that's already installed to the Common7\IDE\Extensions
directory.
Regards, Aaron
I find myself on this question because of exactly the same build issue of a VSIX Installer Project for our project templates. This solved my issue.
Indeed, I uninstalled the prior version of our templates and the build occurs without issue.
Have you double checked that all of your projects are using compatible framework versions?
As in you can't use a .Net 4.0 assembly in a .Net 3.5 project.
Is the project linked with source control like TFS? If so then take latest from TFS and try again.
Are you running Visual Studio as Administrator?
Maybe you have insufficient rights for some file (copy/move/delete) especially in bin or obj folders.

How to convert Visual Studio 2005/2008 project to Visual Studio 6

Is there any tool to convert Visual Studio 2005/2008 project to Visual Studio 6? Thanks.
Doubtful. I am pretty sure Microsoft does not have anything like that.
I assume this is a C/C++ project? VS 6 was before .NET.
I guess your best option is to start with a blank VS 6 project and manually add the source files.
After adding the source files, attempting a compile should quickly tell you what library/include folders you need to reference.
Microsoft does not support that conversion. But there is some tool to convert from vc7 to vc6 projects. http://www.codeproject.com/KB/applications/prjconverter.aspx
I do not know of such a tool. Instead, import the individual source files into a new VS6 project.
This make be a long shot here, but on Codeproject, there's an article on converting a solution to a Linux Makefile, and use that make file under VC6...Would this be useful?
Hope this helps,
Best regards,
Tom.

Resources