How to perform the build OpenCVBlobsLib Lib in Microsoft Visual Studio 2013 (works on previous versions)
Step by step (I put this tutorial in github issues but closed)
I download your cvBlobslib (https://github.com/OpenCVBlobsLib/opencvblobslib)
I create an Empty Project in Visual Studio 2013
I put the 6 .h and 5 .cpp in the project
I Binding all OpenCV dependencies (https://www.youtube.com/watch?v=v-VgWxkVp2w)
I download this file: pthreads-w32-2-9-1-release.zip 1.17MB
and Unzip in this Folder: C:\pthreads.hWin32 (I create this folder)
This folder had 3 Subfolders: "Pre-built.2" , "pthreads.2" , "QueueUserAPCEx".
"Pre-built.2" had 3 Subfolders: "lib"(2 Subfolders: x64 with libpthreadGC2.a(Exetension .a) and pthreadVC2.lib, x86 I don't use it), "dll", "include" with 3 .h files.
I add "include" in "Additional include directories".
I add "lib" in "Additional library directory".
I add "pthreadVC2.lib" (inside lib folder)
change the "Configuration Type" in Configuration Properties -->> General to Static Library .lib
I add this Line above all includes and in All .cpp:
#pragma warning(disable: 4996)//This function or variable may be unsafe
in main menu I select Release / x64 and I click in "BUILD" -->> "Build Solution"
In folder: C:\Users\Ricardo\Documents\Visual Studio 2013\Projects\cvBlobsLib\x64\Release
Had cvBlobsLib.lib with 11.554 KB.
You can download the Result here:
https://www.dropbox.com/s/bctrg3o8jihnf2r/cvBlobsLib.lib
Related
I have to setup build process in Bamboo server. My requirements are,
We have a web-server application [more than 20 web projects, 10 windows service projects, DB scripts, some supported utilities like exe, xml's, code signing certificates, ssl certificates]
We have already build automation in c#, which uses NSIS scripts to generate installer.exe
Our build process has the following steps:
Checkout the source code
Checkout the Utilities
Checkout the NSIS installer source code
Update the source code
Update the Utilities
Update the Product versions in all the Assembly files of all the projects & Wix files
Build all the MSI projects based from the list [Project.xml] -> Once build completed with Code Signing post build CMD, then move to
some [ex: LatestPackage] folder in any [ex: Package] directory
Build all the Web app projects from the list [Project.xml] -> Publish into some [ex: LatestPackage] folder in any [ex: Package]
directory
Build all the support projects for installer from the list [Project.xml]
Copy the "LatestPackage" from "Package" directory to "LatestPackage" folder in "NSIS Installer" directory
Update the Installer source codes
Copy the installer custom assets to respective folder in "Installer" directory [SQL, some exe's]
Update Installer.xml file with the Branding information's in "Installer" directory
Compile Installer.nsi file & Installer package will be generated under Installer directory
Could anyone guide me in right path to achieve this.
1. Need to setup task for each and every projects?
2. Where to keep the files once build completed?
3. How to move the all the projects binaries into another projects directory?
4. How to keep the supported files and copy them to our source code folders?
5. How to maintain the generated build?
Is Bamboo Server Windows based? Can Visual Studio be installed on it?
If yes then you can automate building NSIS installers using MSBuild and Visual & Installer.
Also (if VS is present) there is an option to create NSIS project in Visual Studio and build the installer from it (building the solution from command line).
I have a .NET Core 3 project in Visual Studio 2019. When I copy and paste a file, through Windows Explorer, into the project folder, Visual Studio automatically includes the file into my project, which I do not want to happen. Is there a setting to disable this feature?
Starting from VS 2017 project format in .NET has changed. You need to add <PropertyGroup> tag at the top of your .csproj file:
<PropertyGroup>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
Here is the complete answer to your question:
In Visual Studio, why are all files automatically part of my C# project?
Well, you can modify the known project file (.csproj for c# project), by customize the items include path that satisfied your include files specifically.
For more details, you can check these out:
https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-well-known-item-metadata?view=vs-2015&redirectedfrom=MSDN
Understanding a csproj assembly reference
Including content files in .csproj that are outside the project cone
Enjoy and deploy with confidence!
I have compiled opencv3.4.0 with cuda9.1 support using CMake on Windows 10:
and then I built the INSTALL file in visual studio 2015 in OpenCV.sln.
But this is my Release folder:
The file opencv_cudaoptflow340.lib is not anywhere in C drive, however it should be in C:\opencv_3.4.0\opencv\build\lib\Release. How can I build opencv so that these library and dll files are generated?
You build opencv_worldxxx.lib all is inside as well in opencv_worldxxx.dll. You can unmark the option in Cmake related to opencv_world library. Than the libs and dll will be in separate files. Marked world all is in that single file. Unmarked option generates opencv_core opencv_videoio opencv_ml .lib .dll. You can decide one or another. There is difference in link one library or several libraries and consider this in packaging of your app. build in Cmake
I installed RAD Studio 10.1 Update 2 using the web installer. It uninstalled the previous 10.1 Update 1 and performed everything without error messages.
The new version is able to build C++ projects for Android, iOS, and Mac OSX. But when I try to compile projects for Win32, both VCL and FMX, I get this unexpected error:
[bcc32 Error] windows.h(1): E2209 Unable to open include file 'winapifamily.h'
Full parser context
Project1.cpp(3): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\vcl\vcl.h
vcl.h(10): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\vcl\basepch0.h
basepch0.h(62): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\rtl\System.hpp
System.hpp(19): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\rtl\sysmac.h
sysmac.h(141): #include c:\program files (x86)\embarcadero\studio\18.0\include\windows\sdk\windows.h
From the following article on EDN:
Issues with winapifamily.h and other header files after installing C++Builder 10
There is a known issue where occasionally, after the C++Builder and RAD Studio 10.1 Berlin Update 2 installer has run, eight header files may be missing from C++Builder’s include\windows\sdk folder.
The bug manifests as trying to build a Windows C++ application, and getting a compiler error at the top of windows.h stating that winapifamily.h was not found.
These eight headers are available in a zip file for download.
Installation
It is not necessary to close RAD Studio or C++Builder.
Download the zip file. Right-click on it and choose Extract All, and ensure the checkbox ‘Show extracted files when complete’ is checked. Click Extract.
Once the extraction is complete and the folder where the files were extracted to is opened, select all eight header files, right-click on them, and select Copy.
Open another Explorer window and navigate to:
C:\Program Files (x86)\Embarcadero\Studio\18.0\include\windows\sdk
Right-click in an empty space in the folder, and click Paste. You will be prompted for administrative permissions in order to paste into this folder. Ensure ‘Do this for all current items’ is checked, and click Continue.
Once complete, return to C++Builder and you should be able to successfully compile.
when I create a build for the Team Foundation Service, I get all kind of reference dll's not found exceptions.
These references are added by nugget packages.
I've added the 'package restore' option on the solution which added 3 files in a .NuGet folder.
EDIT
When i got the solution from TFS on another pc, i got the same errors (missing dll's), so it's not only the TFS build service having problems.
The missing dll's are are missing files from installed nuget packages (some are part of the default VS template, Unity was a package i added later), which (the packages) are added on the first pc, but then are missing on the next pc (that's why i added the 'or' in the title of this question)
How can i get the Nuget added files on pc2 too?
I guess you've found a solution by now. I write this just to provide an answer for this question.
To have NuGet packages automatically downloaded on another PC, you need to enable NuGet package restore on build. You do this in two steps:
Right click the solution and select Enable NuGet Package Restore.
This will add a .nuget solution folder with NuGet.Config, NuGet.exe and NuGet.targets underneath it. These files should actually be checked in to source control, but the binary file is tiny. It will also modify the MSBuild scripts in all projects of the solution to import the NuGet.targets file to hook NuGet into the build process.
In Tools -> Library Package Manager -> Package Manager Settings make sure the option 'Allow NuGet to download missing packages during build' is checked.
This step must be done on all machines.
Now the BuildDependsOn property of all project build scripts should make the RestorePackages target in NuGet.targets kick in and download missing packages before you get build errors for missing references.