Eclipse - Can't edit cpp files in my eclipse - folder is not accessible - c++

i want to edit cpp files in Eclipse but can't open the folder that contains the cpp files.
The folder symbol is a folder with an exclamation mark at the bottom right. I tried to look up the meaning of the symbol in the eclipse docs but didnt find something. Maybe a bit more background: the cpp files belong to a cocos2d-x application, eclipse cdt is installed. The files are normally accessible with notepad++ or any other texteditor but eclipse just doesn't list them. Refresh, clean or restart didnt help either. Maybe you guys can help me out.

The esclamation Mark deals with build path problem. This problem are usually related with eclipse metadata, probably rebuilding the Index Will fix it, but the easiest thing is delete the project (without deleting from disk) and import the project using import existing project into workspace. Male a backup before any operation.

Found the problem, a little fault in the path, edited the folder properties now everything works!

Related

Importing C++ project in Xcode

How do I import a C/C++ project(NS3, GNU-Radio) to Xcode 7? The main reason I want to do this is to get autocompletion and Quick Help definitions. This can be done in Eclipse by:
File > New > 'Makefile Project with existing code'
It would be nice to have the debugger working as well but not necessary
The answers I have found are mostly for Xcode 4 and seem not to work on Xcode 7
Thanks
The easiest way is to drag and drop all files of the Sources folder into project Navigator of XCode directly from the file browser. That will pop up a wizard to import files into the project. At this point you will need to check the application name into the "add to target" field. Failure to do this would include the files into the project but without actually compiling them.
You do not need to update the include path because the Wizard has already do that for you.
Here is an example: https://www.youtube.com/watch?v=Fqovf9OghSM under OSX if it helps :)

CFBuilder / ColdFusion : Why are there no files after my Dreamweaver Import

I have recently inherited a directory of ColdFusion code developed in Dreamweaver. After downloading the source from svn into a local development directory, I attempted to follow the instructions I found in several places online for Importing a Dreamweaver site into a project, using the Existing Folder as New Project option (since it was never previously a CFBuilder project, just Dreamweaver), I assigned the CF Nature to the root in the Navigator window. However, when I attempt to drop the tree below the root, no files appear - and the little > arrow is even gone, as if there are no files.
What should I be looking at here? Obviously it lacks something that tells it all the files in the project. It is odd, because when I select the root of the directory where all the source files are "ZZZ Master Website", it creates another directory INSIDE that directory, also called "ZZZ Master Website". That's where the .project and settings files show up. I feel like I'm missing something.
FWIW, I'm no CF guy - I'm inheriting this because that resource is no longer available. So... be patient - I'm trying to come up to speed here.
Thanks for any help in advance!
duncand

Unnecessary imports in Eclipse CDT

I converted from GCC 3.4.2 to 4.8.1 but my projects in Eclipse still leave the imports, and those imports also show as warnings in the source code. I can't find any way to remove them manually and those folders don't exist on the filesystem. How do I fix this?
Here is an illustration: http://i.imgur.com/dSejoWs.jpg
Goto Project 'Properties->C++ General->Path & Symbols Includes' Tab and remove those path entries there, respectively change them to your new installation paths.
Another place to look might be 'Properties->C++ General->Preprocessor Include Pathes', if there are project specific entries for these pathes.
I fixed it by deleting the .metadata folder in the workspace directory and reimporting the project. I had to reconfigure Eclipse but at least it works now. Thanks for the suggestions.

C++ Adding libcurl (using Curl)? - My attempts explained

Okay, so I know this sounds like a very nooby question but I did my best so please hear me out before adding negative comments/downvoting.
Okay, so from what my research says, using "cURL" for my C++ program when involving anything web-related is the best way to go. Now, me being new to C++, I didnt want to ask questions for every step and try doing it myself, apparently, this was not the case.
Problem: CodeBlocks is not recognizing the curl plugin (saying it does not exist)
Goal:
Attempt to make the example source located here (from the official cURL website) work.
Attempt 1:
So, I downloaded the plugin using the "help manager" where it shows which is the best thing to download. I got the .zip file "curl-7.24.0-devel-mingw32" back. I decided to copy the contents of the "bin" folder to my projects bin and copy the "include" folder to my project. It kept saying it did not recognize "/curl/curl.h" or saying it did not exist.
Attempt 2:
Without deleting the "bin" and "include" folder, i decided to move the "curl.h" folder into my project itself (via CodeBlocks) by creating a folder called "curl" and then putting the "curl.h" inside the folder (The folder "curl" was in the "Headers" folder created by the program) and attempt to run it again seeing that it existed. Same Error
Attempt 3:
After countless searches, I come across that I should put my curl files and all the files inside the "bin" folder into C:\Windows\ folder. So I copied everything in the "includes" folder and the contents of the bin folder (including the "curl" folder in it) to the WINDOWS folder. Same error.
Attempt 4: - Sort of...
Now, there was something about going to my project options and selecting certain files to import and that stuff but it was way more confusing because each site had different options so im unable to do recall the steps.
Im now relying on the StackOverFlow community to give me a hand. I tried explaining my problem in the most detailed way but if you have any questions or need more information, dont hesitate to ask. Also, here is the errors im getting:
http://pastebin.com/raw.php?i=B1wsqvmA
Here is my source:
http://pastebin.com/raw.php?i=YShFZf8G
Can someone please guide me through this mess? Thank you so much!
the problem is that you're not telling codeblocks where to search for the include files, you shouldn't be copying the headers to the project's folder.
You can select the include directories this way:
In Project -> Build Options -> Search Directories -> Compiler
There is a button to add include directories, in this case the "include" folder of libcURL, And that error should be gone.
You will have to follow a similar process to add the files for the linker.

Visual Studio can't 'see' my included header files

I created an empty 'Demo' project in Visual Studio 2008 and added some existing projects to my solution. Included "MyHeader.h" (other project's header) in main.cpp file which is in 'Demo'. Also added header files' path in "Tools/Option/VC++ Directories/Include files" section. But intellisense says: "File MyHeader.h not found in current source file's directory or in build system paths..."
How the problem can be fixed?
Delete the .sdf file that is in your solution directory. It's just the Intellisense database, and Visual Studio will recreate it the next time you open that solution. This db can get corrupted and cause the IDE to not be able to find things, and since the compiler generates this information for itself on the fly, it wouldn't be affected.
If you choose Project and then All Files in the menu, all files should be displayed in the Solution Explorer that are physically in your project map, but not (yet) included in your project. If you right click on the file you want to add in the Solution Explorer, you can include it.
This happened to me just now, after shutting down and restarting the computer. Eventually I realised that the architecture had somehow been changed to ARM from x64.
In Visual Studio 2019 in my case I copied a header file into the project directory, just near the other files. Intellisense could see it, but the build failed. Fair enough, it wasn't actually added to the project. I added it as existing item but this is the point that Visual Studio still didn't account for it.
Solution:
Close the project.
Delete the .vs directory.
Reopen the project.
Now Visual Studio recreates the directory with everything in it and it can now see the included file.
If it is the case that only the IDE indicates that it cannot find included files, but compiling is successful, the issue is simply that IntelliSense is not fully up to date with recent changes. This can happen specifically when including existing projects, in my own experience.
Deleting the .sdf file (= IntelliSense database) that is generated in your solution directory forces Visual Studio to regenerate it, so that it is up to date again. Just doing a "clean" will probably do the same thing, but takes more time since everything will be generated again then.
I know this is an older question, but none of the above answers worked for me. In my case, the issue turned out to be that I had absolute include paths but without drive letters. Compilation was fine, but Visual Studio couldn't find an include file when I right-clicked and tried to open it. Adding the drive letters to my include paths corrected the problem.
I would never recommend hard-coding drive letters in any aspect of your project files; either use relative paths, macros, environment variables, or some mix of the tree for any permanent situation. However, in this case, I'm working in some temporary projects where absolute paths were necessary in the short term. Not being able to right-click to open the files was extremely frustrating, and hopefully this will help others.
Had the same problem. Double check if you added the include files to Debug or Release Version of your project. If you only added it for one of them and compile for the other VS will just play dumb and not find them.
Try adding the header file to your project's files. (right click on project -> add existing file).
In my experience, with VS2010, when include files can't be found at compile time, doing a clean, then build usually fixes the problem. It's not that rare for the editor to be able to open an include file and then the compiler to announce that it can't find that very file, even when it is open on the screen!
If the visual studio says that you miss some file in the current source file folder, there is one solution that i used. Just right click the file you want to add and choose Open Document, if it really doesn't exist, then you should see something like cannot find file in the source file path = "somewhere in your computer", then what you could do is the add your source file into that path first and see if it works.
I had this issue after upgrading to Visual Studio 2019 from 2015. It would compile the project fine but Intellisense and the IDE couldn't find any header files.
The project only had valid configuration for Win32/Debug. Include paths were not setup correctly for other environments. Even though Visual Studio displayed the current environment as Win32/Debug, Intellisense must have been using something else.
Changing the current environment to x64/Release, and then back to Win32/Debug fixed it.
In Visual Studio, click on Project > Rescan Solution as shown below to rebuild the project database.
Here's how I solved this problem.
Go to Project --> Show All Files.
Right click all the files in Solutions Explorer and Click on Include in Project in all the files you want to include.
Done :)
I encountered this issue, but the solutions provided didn't directly help me, so I'm sharing how I got myself into a similar situation and temporarily resolved it.
I created a new project within an existing solution and copy & pasted the Header and CPP file from another project within that solution that I needed to include in my new project through the IDE. Intellisense displayed an error suggesting it could not resolve the reference to the header file and compiling the code failed with the same error too.
After reading the posts here, I checked the project folder with Windows File Explorer and only the main.cpp file was found. For some reason, my copy and paste of the header file and CPP file were just a reference? (I assume) and did not physically copy the file into the new project file.
I deleted the files from the Project view within Visual Studio and I used File Explorer to copy the files that I needed to the project folder/directory. I then referenced the other solutions posted here to "include files in project" by showing all files and this resolved the problem.
It boiled down to the files not being physically in the Project folder/directory even though they were shown correctly within the IDE.
Please Note I understand duplicating code is not best practice and my situation is purely a learning/hobby project. It's probably in my best interest and anyone else who ended up in a similar situation to use the IDE/project/Solution setup correctly when reusing code from other projects - I'm still learning and I'll figure this out one day!
If some soul has scrolled down to this bottom, what worked for me was disabling the Disable Database option i.e. set it to False under Tools|Options|Text Editor|C/C++|Advanced. For some reason, it was set to True for me.
As per docs, if it's set to True
All use of the code browsing database (SDF), all other
Browsing/Navigation options, and all IntelliSense features except for
#include Auto Complete are disabled.
None of the solutions worked for me. Here is what was the issue for me:
(Note discrepancy in build configuration and VC++ Directories (x86 vs x64)
To fix, just changed the build configuration to 'x86':