why have my c++ compilers disappeard from vscode? - c++

I was trying to write a c++ program, but when i went to compile it all my compilers had disappeared from the menu. I know theyre installed as ive used them before, but for some reason they arent showing up in vscode. The only thing thats showing up now is "cl.exe" before i also had the option of g++ and nothing has changed with the system so im very confused as to why this is.
I've tried restarting my computer, restarting vscode, checking if my compilers have somehow uninstalled themselves, but they all seem to be there. So i dont know why theyre missing.

Related

Visual Studio stopped recognizing any include files

So, I was randomly working on my project and visual studio 2017 was recognizing all my OpenCV stuff just fine, but randomly all of a sudden, it stopped recognizing it right while I was in the middle of coding it, there's errors all over the place saying that functions from OpenCV are undefined and that the source files cannot be opened, this literally makes no sense as it was just working and I had gotten stuff to compile and then all of a sudden in the middle of coding, it just will refuse to recognize anything, I'm really confused and I checked the include and library files and everything was just the same as it was when I had started out, I think something might be wrong with Visual Studio, but I have no idea what to do. I even tried restarting my computer to see if that fixed it, but I'm still stuck in the same boat :/
Edit: Interesting note, when I go to access the project properties, it no longer says properties, it just says properties, could it be a corrupt project?
Okay, so Richard Critten's suggestion of doing a chkdsk /f worked, I rebooted to have it check my main disk and now it oddly requires me to specify a folder in the include directory which I didn't have to do before which is odd, but now it's finally working and recognizing everything as it should. Thanks for the help, I just had never seen it before do that while in the middle of a project randomly which severely confused me.

Xcode 3.0 debugger keeps skipping breakpoints.

I'm using Xcode 3.0 on a PowerBook G4. I needed to test some code to see how it runs on a big endian host. I already had it set up to go so got it out to test.
I first created an empty project and added my binary as a custom executable as well as loading in some source files. This seemed to be working fine. The code is a C++ terminal application and I had already setup a Makefile with CMake.
In the beginning I set up some breakpoints and started up the debugger. And it worked well. Stopping at my breakpoints. But then something happened that I don't know what and it started ignoring them.
I setup a new project like before and started from scratch again. Loaded the debugger. And once again it ignored them!
So then I managed to get CMake (2.8.12) to generate an Xcode project file. Which didn't go too easy as it didn't know what compiler I had. Looks like I stumbled onto another bug there. I eventually got past it by going between the CMake GUI and terminal.
I then closed all windows in Xcode and quit it. I then opened up the new project to start afresh. I set up some new breakpoints and loaded up the debugger. The code fell through again but then I realised I didn't set any arguments. So I did that and tried again. It ran through again! I looked up how to reset Xcode prefs and did so. Try again and it keeps ignoring my breakpoints!
I know it's kinda bad to setup an account to ask a question. And I hate to do that. But I'm really over this and don't know what is wrong with it. I've Googled for answers, got some hits here, and tried suggestions like disabling lazy symbols, making sure strip doesn't kill debug symbols and other symbol stuff but none has any affect. I've wasted hours trying to fix it instead of testing code I need too.
What's disconcerting is that no source is loading into the [GDB] debugger either. I actually forced it to stop by doing an implicit read from location zero in my source. And even this wasn't right. It didn't even load up the source but just gave me a disassembly. Even though I had it set to show only source. There's something wrong with it. :-?
Well thanks for any help. I don't know if I'm getting old or what. But this is getting as annoying as a small hidden bug in code that brings the whole house down! ;-)

Eclipse not building properly

Okay so basically I'm working on recursion. And I recently switched from a mac to a PC, so I'm now using eclipse instead of XCode for programming c++. now this has happened to me a couple times, and I still have no idea why its doing it. When this happens I do not get an error code, I've searched far and wide for this solution but haven't found one yet, so i'm hoping you guys could help. So everything was going great (almost finished), but i realized a bug, so I fix it, then I save it, then I build it, run it, then it doesn't build properly (i'm assuming), like it didn't build my new code, it just rebuilt my old code and ran that, im using MinGW, I've also tried to import my old code via copy and paste, but it did the same thing, please help.
*let me know if I left anything out that might be needed to know
**update on my project file it does have a error sign on it, but there isn't one in my code
***update update I looked through the errors and found that it doesnt have permission to open output file "recursive.exe" (my project name)
OK solution: run eclipse as admin

Eclipse with CDT not compiling at all

I have been trying out using Eclipse CDT for a course I am taking. Previously I have been using Visual Studio Express but since that requires me to be online and I have to use the IDE+compiler offline, I switched to Eclipse + Cygwin GCC.
Now everything was working prefectly, until I got an error about file paths in my make file. After reading some of the posts online, the issue seemed to be that Cygwin's make does not resolve absolute Windows file paths because of the ':' symbol and confuses it with a new target definition. The proposed fix was to download a fixed make file. I diligently did so and the programs would compile fine.
But after I went into the first debug session, everything froze. I aborted eclipse and tried a clean build but now the compilation wont happen AT ALL, which is very weird for me.
I can't find a post for a similar problem so I am really stuck now. I was currently working the assumption that my CDT may be corrupt or something so I downloaded Eclipse Luna just today and tried building using that, but no joy. Even a fresh project in a new workspace wont compile.
Appreciate the help in advance.
Did you try redownloading Eclipse? Sometimes Eclipse gets a fatal error glitch that makes it unable to compile anything. I've had this problem before, the only way i was able to fix it was to uninstall and re download the latest version. If this doesnt work, try switching to Bloodshed Dev C++ or codeblocks.
So it seems like an issue with the new make (v3.80). upgating it to v4.08 fixed the issue of not building.
Version 4.08 however does not fix the Windows file paths not being recognized properly and treated as a target definition. I am still getting the multiple target patterns. stop error.
EDIT: Found this on Stack overflow to solve the issue... should have searched better previously.
Very simple application fails with "multiple target patterns" from Eclipse

Unable to compile almost anything? Linking problems? C++

I have just started to learn about how C++ works however it seems that any source code I get I can not get to compile. Even when I try to copy the tutorials in their own project I get errors. For example, when I want to follow along with this, http://www.directxtutorial.com/Lesson.aspx?lessonid=11-1-3 Visual Studio gives me back tons of errors. http://gyazo.com/7131e8d21a8aa5c44c68f3e846da7921 Can anyone tell me how to fix this? I have tried many different OpenGL and DirectX tutorials and none of them seem to work (on several computers). I then tried Code Blocks and got that doesn't seem to work either.
You need to do some changes in project settings.
Go to project properties->General->Character Set, use the "Use Unicode Character Set" and then compile the project. It will work perfectly.