VCPKG, not a found command right after installing it? - c

I am trying to use #include<graphics.h> in visual studio code to display graphics in C. When I used graphics.h as a header the following error occurred,
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\Users\natha\Desktop\My OS\src\impl\kernel\main.c).C/C++(1696)
cannot open source file "graphics.h"
So as the quick fix suggests it shows me how to install a library for this header with VCPKG (https://vcpkg.io/en/getting-started.html). When I follow the steps by cloning the repository and running the bootstrap, I go to install the graphics package but the cmd says that 'vcpkg' is not a found command. I'm not sure why it says this or how to fix it.

Add the vcpkg.exe binary path to the PATH environment variable
or run vcpkg from the directory where you installed

Related

Building Anjay tutorial codes

I'm getting some difficulties on building the tutorial codes of Anjay https://github.com/AVSystem/Anjay. the doc wasn't really helpful.
I tried a simple :
cd examples/tutorial/custom-object
cmake . && make
but I'm getting this message :
By not providing "Findanjay.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "anjay", but
CMake did not find one.
Could not find a package configuration file provided by "anjay" with any of
the following names:
anjayConfig.cmake
anjay-config.cmake
Add the installation prefix of "anjay" to CMAKE_PREFIX_PATH or set
"anjay_DIR" to a directory containing one of the above files. If "anjay"
provides a separate development package or SDK, be sure it has been
installed.
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.10)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
I would appreciate any suggetions.
Thank you.
I was doing the same thing. The error is because you have not installed anjay libraries on your local system or provide a way for CMake to find it.
I installed it by following steps mentioned in compilation docs
In the root of Anjay directory execute the following:
cmake . && make && sudo make install

Include path not found

I recently upgraded to Mavericks OS and XCode 5. Eclipse is showing me the following warning with any C projects that I'm working on:
Invalid project path: Include path not found >(/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple->darwin11/4.2.1/include).
It is unable to find the standard C libraries like stdio. Hovering over #includes <stdio.h> tells me 'Unresolved Inclusion: stdio.h'.
My project is able to compile in Eclipse, and via command line using gcc. Previously, before upgrading, Eclipse did not warn this.. Appreciate any assistance rendered.

freeglut error LNK1104

In my project I want to use a freeglut library from the unofficial opengl sdk.
I used Premake to generate build files for vs2010. Then I built all libraries (debug). In my project I set Additional Include Directories, Additional Library Directories for the freeglut. In additional dependencies I added freeglutD.lib.
In the code I just include a freeglut header. When I want to run the program I get an error:
>LINK : fatal error LNK1104: cannot open file 'freeglut.lib'.
The freeglutD.lib is the only file in sdk/freeglut/lib. There is no freeglut.dll and freeglut.lib in sdk.
Earlier I was using freeglut 2.8.0 MSVC Package from link which is linked dynamically (contain freeglut.dll) and everything works fine.
What is wrong ?
My guess is that you forgot these lines from the documentation on using the SDK:
You will also need to add some #defines to your command line. These are:
FREEGLUT_STATIC
_LIB
FREEGLUT_LIB_PRAGMAS=0
You need that FREEGLUT_STATIC to let GLUT know that it's linking statically. Otherwise it looks for a DLL.
I had an older project from VS12 and got the same LNK1104 error when trying to build it after upgrade in VS15. All I had to do to fix this was run Package Manager Console (Tools - NuGet Package Manager) and type in:
Install-Package freeglut
Note, that I have reference to glew.h and freeglut.h in one of my header files like this:
#include "..\packages\nupengl.core.0.1.0.1\build\native\include\GL\glew.h"
#include "..\packages\nupengl.core.0.1.0.1\build\native\include\GL\freeglut.h"

Error - Compiling Gnuplot on Windows 7 using nmake and makefile.nt

Gnuplot experts or anyone who is willing to help me - I have explained what I have done in very simple words and in a detailed manner. Thanks for your time and patience in advance.
My aim is to develop a new feature in Gnuplot by adding a new terminal to it. I did the following steps in the order mentioned
I formatted my system and reinstalled Windows 7. (no antivirus installed)
Installed Visual Studio 2008
Downloaded the source code of Gnuplot
Now, am supposed to set up the compiling environment for Gnuplot in Windows. So, I did the following steps as per the instructions in "README" and "INSTALL" files in the source code package.
Opened up Visual Studio 2008 Command Prompt
changed directory to the "src" folder in the source code
Then I ran the nmake tool (the make tool meant for Visual Studio) using the file makefile.nt (which is for Windows)
nmake -f C:\Users.........\config\makefile.nt
It compiled successfully and gave the wgnuplot.exe and gnuplot.exe files as output. Also the manifest files were created. (Note: I have not changed any piece of code from the original source code package)
When I tried to open the exe file generated from the compilation, it threw me this error
The program can't start because MSVCR90.DLL is missing from your computer. Try re-installing the program to fix this problem.
This MSVCR90.dll should be installed already when Visual Studio was installed. I checked the C:\Windows\winsxs\x86_microsoft.vc90... folder and the MSVCR90.DLL was alread there. Then, I tried 2 things to solve this -
Anything to do with PATH variable? I made the PATH variable point to that directory. It threw me a new error that says
Microsoft Visual C++ Library. Run time error. R6034. Here is the detailed picture of the error
So, I reset my path variable back to the old value and followed the steps in THIS FORUM POST to fix the missing dll problem by copying the dll files to the C:\Windows\system32 folder. Again it threw me the same run time error
AM STUCK AT THIS POINT. Please advise me on how to rectify this
problem. THANKS A MILLION :) Advance thanks to you :)
Is there any reason you need to use VS2008?
If not I'd recommend to use the current VC release.
Your problem looks like some sort of version mismatch/incompablilty issue to me ...

How to configure visual studio 2010 with opencv cvblobs library

I'm having difficulty of installation/ compilation of cvBlob into OpenCV Microsoft Visual Studio 2010 in WINDOW. I understood that there is a installation guide work on linux but I couldn't find how it can be done in Window.
I would appreciate if someone may provide me the installation guide in WINDOW as I found that cvBlob is very useful for my project.Thanks
For the moment there is no pre-built cvBlob for Visual Studio, so you are going to have to compile it yourself.
So before you start, make sure you have OpenCV installed in your computer.
Download CMake for Windows. CMake creates the Visual Studio project files that are needed to compile cvBlob.
Once you open cmake-gui, fill in the edit boxes "Where is the source code" and "Where to build the binaries" accordingly (adjust these to your settings):
C:/Documents and Settings/user/Meus documentos/Downloads/cvblob-0.10.3-src/cvblob
C:/Documents and Settings/user/Meus documentos/Downloads/cvblob-0.10.3-src/cvblob/build
Note: the build folder was created manually.
Click on button Configure to check for dependencies (CMake will try to find OpenCV on your computer) and then on Generate so it can generate the Visual Studio project files.
From here on it's the standard compilation procedures.
karlphillip's answer is correct, and you should follow it. Be advised, however, that if you're building the files using VS 2010, a few of them will fail and return this error:
LINK : fatal error LNK1104: cannot open file '..\lib\Debug\cvblob.lib'
To get around this, add the following to your cvblob.h file:
#define EXPORT __declspec (dllexport)
In the extern "C" block below that, add EXPORT before every function. For example:
EXPORT double cvContourPolygonArea(CvContourPolygon const *p);
After running into this error myself, I found the explanation here (which I adapted to make this post; all credit belongs to this link's author): https://code.google.com/p/cvblob/issues/detail?id=34
Just something you might want to watch out for. Hope it helps!

Resources