Cannot open source file "glad/gl.h" GLFW OPENGL - c++

It keeps showing this error Error I cannot figure out why, I am using VSCODE the newest version, here is my C/C++ Properties json: c_cpp_properties.json I have it set up all correctly according to tutorials. files
I can't get rid of this error no matter how much I try,

According to the image you provided, there is no glad/gl.h in your project
are you sure you are looking for <glad/gl.h> and not <glad/glad.h> ?

Related

How to set the correct Intellisense configuration for include path in VS Code?

I am trying to work with Emscripten. I have the compiler set up and working and now I'd like to write some code.
However, the include for emscripten remains underlined in red and I can see this error:
#include <emscripten/emscripten.h>
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (D:\MYPROJECT\cpp\main.cpp).C/C++(1696)
cannot open source file "emscripten/emscripten.h"C/C++(1696)
A "Quick fix" (quotes intended) takes me to the Microsoft C/C++ Extension - IntelliSense Configurations. And there I can edit include paths. I have created a new configuration named EMSCRIPTEN and set these paths:
${workspaceFolder}/cpp/**
D:\lib\emsdk\upstream\emscripten\system\include
But this has no effect. Now if I do add this to the default configuration that was there from the start (Win32), it works. But I don't want to use that one for my emscripten project! I was kinda hoping to convince to IDE to compile my programs as well.
So how do I set per-workspace C++ compiler settings to a given configuration?
Ok, I found it, it's to the right bottom of the screen next to language type selection:

Xcode noob: Don't understand compiler error message

I'm fairly new to Xcode and have recently gotten an error message that is probably clear to anyone who knows what they're doing, but I am unsure how to react to this one.
I have a project that is mostly C++, with just a few C files in it. Everything was fine until I tried to add some code to find the computer's MAC address. Apple provides a project example (GetPrimaryMACAddress), and I downloaded, built, and tested that. It works just fine.
After that, I simply copied the C source from the Apple example project and included it into my code project. Then I started getting this error message:
I have tried including the IOKit framework explicitly via the linker; no help. I tried adding more #include statement to the Apple example code; no help. I think that I do not understand what the compiler message is telling me regarding importing from module 'Darwin.MacTypes'.
Clicking on the error message took me to a line in usr/include/MacTypes.h:
I'm not clear on how to Import Darwin.MacTypes. I don't really understand how the source code for GetMACAddress could compile so effortlessly in one project and not another. I didn't rearrange nor add nor delete any of the #include statements in the Apple-supplied C file.
I'll bet there is a simple answer that I am just not seeing. How should I react to this error message?
I had a similar problem with types like UInt16 and UInt32. I just included the MacTypes with the following include statement:
#include <MacTypes.h>
This solved all my type-problems for my example c-file.
Let me guess, when you want to compile C++ source, you should create a C++ source file
(On the toolbar: File > New > File.. > Source > C++ File)

C++ Error RC2104 trying to compile PuTTY-PSCP (for Windows) on Visual Studio 6.0

I was about to use PuTTY Development source code for Windows to create my own client application (found here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) but as I tried to compile the PSCP project (SCP Client), I got the following error :
C:\work\2015\Putty\windows\version.rc2 (18): error RC2104 : undefined
keyword or key name: BINARY_VERSION
I've been going through the various posts involving this error but didn't find anything working :
error RC2104: undefined keyword or key name: DS_SETFONT :
On this post I noticed that the version of MSVC was brought up so I figured maybe something has to be done to get PuTTY to work on VC 6.0 ?
Also I tried to add #include <windows.h> in both version.rc2 (version.rc2 is used for inclusion in all .rc files) and pscp.rc, none worked.
I'll be quick to answer if you need any information (project properties, source code...)
USING Visual Studio 6.0 with SP6 on Windows 8.1
Probably, wrong version.h is seen.
Correctly, the file version.h in the project folder should be seen.
Please try to modify version.rc2:
#include "version.h"
to
#include "..\\..\\..\\version.h"
At least, resource compiler will end successfully.
If you search through the PuTTY source files, you'll notice that BINARY_VERSION is defined in version.h and used in windows/version.rc2, which #includes version.h.
Since your version.rc2 isn't seeing version.h, try to figure out why: Is version.h still present and does it still contain BINARY_VERSION? Are your include paths correct? Is there another version.h somewhere else in your include path that's getting picked up by mistake?
Which source code are you using ?
I tested latest(0.64) "Release source code for Windows".
direct link is
http://the.earth.li/~sgtatham/putty/latest/putty-src.zip
I had tried to compile using VC++ 6.0 Professional with SP6, on my PC,
running Windows XP SP3.
After extracting putty-src.zip to somewhere with keeping folder
structures, did you correctly opened 'putty.dsw' in "putty-src\windows\MSVC" folder?
You should be find in 7 projects in 'FileView' tab of the workspace
in Visual Studio 6.0.
You can switch active project to 'pscp' with context menu via
right button click on 'pscp' project.
With modified version.rc2, resource compiler finished successful.
But two (sshshare.c, winsftp.c) C source files failed compiling
with 20 errors. in 'pscp' project.
Errors while compiling 'winsftp.c' is caused 'TIME_POSIX_TO_WIN'
and 'TIME_WIN_TO_POSIX' macros.
'ull(unsigned long long)' is a 64-bit integer-suffix, newly defined in C99. Since C99 standard is not support on VC6, then caused errors.
I had temporally modified
11644473600ull ------> ((ULONGLONG)11644473600)
10000000ull ---------> ((ULONGLONG)10000000)
and confirmed errors are cleared. (Sorry, no validation the code is correctly generated)
3 errors while compiling 'sshshare.c' is also caused another macro.
I cannot understand why you got 116 errors.

why i am receiving cant open file 'opencv_core2411d.obj'

I am tryin to use openCV-2.4.11 library in visual studio 2013, to do so i followed
this tutorial and this slideshare tutorial
unfortunately, every time i run any C++ code even "Hello world", the compiler generates this error Link: fatal error LINK1104: cant open file 'opencv_core2411d.obj'
I also referred to some question in SO but they were not detailed or they discuss importing opencv library but in another IDE not visual studio.
note: the libs i used as input to the linker in the field 'Additional Dependencies':
opencv_calib3d2411d.lib
opencv_contrib2411d.lib
opencv_core2411d.lib
opencv_features2d2411d.lib
opencv_flann2411d.lib
opencv_gpu2411d.lib
opencv_haartraining_engined.lib
opencv_highgui2411d.lib
opencv_imgproc2411d.lib
opencv_legacy2411d.lib
opencv_ml2411d.lib
opencv_nonfree2411d.lib
opencv_objdetect2411d.lib
opencv_photo2411d.lib
opencv_stitching2411d.lib
opencv_ts2411d.lib
opencv_video2411d.lib
opencv_videostab2411d.lib
and i am using win8
please provide steps to successfully import opecv2.4.11 into visula studio and let me know why i am receivin this error
In my experience the linker error:
Link: fatal error LINK1104: cant open file 'opencv_core2411d.obj'
usually means that the linker cannot find the file. This is generally because the linker properties are not correct.
Check the property page under linker->"Additional Library Directories" and make sure that it is filled in and the path is correct.
Depending on how you have the project setup you may have different settings for debug and release configurations.
I was also having the same problem for quite a time and after searching everywhere in the internet i finally got the solution.
These input files are correct but you need to give the full path in Linker->Input->Additional Dependencies. i will show you how.
C:\opencv\build\x64\vc12\lib\opencv_calib3d2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_contrib2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_core2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_features2d2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_flann2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_gpu2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_highgui2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_imgproc2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_legacy2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_ml2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_objdetect2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_ocl2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_photo2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_stitching2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_superres2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_ts2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_video2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_videostab2411d.lib
Also in Linker->General->Use Library Dependency Input, Click on yes
This should certainly help.

ERROR LNK1104 - .`obj` file without any file name

I am trying to compile a project where i am getting this error. I am very new to c++ and dont know much about VC++. And the most irritating part is that the error does not mention a name to the .obj file!!! Here is the whole error [copied from Error List] :
Error 1 error LNK1104: cannot open file '.\Debug\.obj' E:\7zsrc\CPP\7zip\Bundles\Format7zF\LINK 7z
To be more specific, I am compiling the Format7zF bundle included with 7z source version 9.22ß. I have already tried most of the solutions out there but most times either the the problem is different or the solution does not work.
Any help would be great!
Thanks
Update
I just noticed [from the .log file] that at the end of the linker Debug\\.obj was added! Hope this explains the problem more!
Update 2
I am attaching a copy of the project. You can examine the project by opening the solution from [ExtractionPathOfTheArchive]\CPP\7zip\Bundles\Format7zF\ Directory. Hope someone can help.
Link to Project Source("d.zip")
I have just converted the source files from VC++6 to VC++12 and changed the Output File Path in linker to inherit from..., nothing else.
It's Too late, but for records. :)
I had same problem, when I converted the 'QUAKE' project from VC6 to VS2010.
I solved it by changing setting of '.s' files (asm code file).
Check [Properties/Configuaration Properties/Custom Build Setup/General/Outputs]
and there are "$(InputName).obj" macro, then try to change it as "%(Filename).obj".