I have defined a Win32 Application in Visual Studio and named my project as "Test". The structure that has been created and shown in Solution Explorer, is as follows:
- Test
- - References
- - External Dependencies
- - Header Files
- - - stdafx.h
- - - targetver.h
- - Resource Files
- - Source Files
- - - stdafx.cpp
- - - myMainMethodHere.cpp
- - ReadMe.txt
It also created a project in the file system at the following path:
C:{ path }\Visual Studio 2017\Projects\Test\Test
The thing is, in IDE, when I create a new folder or upload existing file (I do it from IDE by right clicking - Add - Existing Item for existing files and Add - New Filter for a folder), whether I create it under Test dir directly or under Source Files, the folder/files uploaded are not shown in Windows Explorer (in the file system). The only files that pop up in the file system are those created as new items, but if I am adding existing ones, they won't reveal in my project's dir. Due to this, when I upload existing files, I get 'no source found' error in the references (include), and even if I specify the directories included (by right clickcing a project - properties - VC++ directories - include directories), the error is still present as no files being physically added to my project's dir.
How to fix it?
Related
How do I include a local file? This is my project structure (with multiple sketches):
(project root)
- some_config.json
- SketchOne/
- SketchOne.ino
- SketchTwo/
- SketchTwo.ino
- lib/
- lib_1/
- some.h
From SketchOne/SketchOne.ino, I want to include lib/lib_1/some.h. I've tried the following(s):
#include "lib/lib_1/some.h"
#include <lib/lib_1/some.h>
#include "lib_1/some.h"
#include <lib_1/some.h>
Note: I use the CLI (arduino-cli)
In Arduino projects are called "sketches". The name of the main ino file of the sketch must match the name of the sketch folder. CLI builds one sketch at time.
Sketches are in file system organized into a folder called "sketchbook". The sketchbook folder should containing a special folder named "libraries". Folders in the libraries folder are treated as libraries. There are two forms of library folder in the file system: old and new.
See the sketch build process too.
I use QtCreator for doing C++ applications, and I'm looking to set a relative build directory to QtCreator, but I want all those builds to be inside a "builds" folder, and not at the root of the folder, where the projects are.
For example, actual directory:
CodingFolder
- build-test1-Desktop_Qt[...]
- build-test2-Desktop_Qt[...]
- build-test3-Desktop_Qt[...]
- test1
- test2
- test3
Now, I want to have it like this:
CodingFolder
- builds
- build-test1-Desktop_Qt[...]
- build-test2-Desktop_Qt[...]
- build-test3-Desktop_Qt[...]
- test1
- test2
- test3
But I don't wan't to set an "static" build folder as the default directory. I want the build folders to be created at the same folder where the project is located, BUT inside a "builds" subfolder
Is this possible?
At the options, there's this setting:
Default build directory:
../%{JS: Util.asciify("build-%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}")}
I tried to add the subfolder at the directory, like this:
|
v
../builds/%{JS: Util.asciify("build-%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}")}
But it didn't work, the subfolder wasn't created.
The project I tried with compiled, but no subfolder appeared (or I don't know where it was stored, then).
I tried searching before posting this question, but only got how to set an static, specific directory, and I want to keep it relative.
Thanks in advance :)
I am refactoring my Visual-Studio-C++ project to use a folder structure rather than the filters in Visual Studio but I have noticed that when I try to include a file, it will use the current directory of that file so my includes look something like...
#include "../../server/IGameServer.h"
This is quite problematic when I refactor and move things around as I then have to go into each file and change their includes...
Is there a way to make every file start from the base directory no matter where the current file is, or a way to include the folder path so I can just use
#include "IGameServer.h"
(1) Go to project properties:
And add folders to "Addiotional Include Directories". ...Make sure that you aply to "All Configurations" (Debug, Release, etc.) and "All Platforms" (X86, X64).
--
(2) Click on that line + one more click on right side, on the down-arrow) & click Edit.... It opens a dialog that looks like that (I already added some folders in this example):
I have a directory like this:
htdocs
- shared
- project 1
- css
- JS
- project 2
- css
- JS
etc.
Now I want to create 2 projects, one with the folders shared and project1 and one with the folders shared and project2.
The first project I can create with htdocs as a root folder, and exclude project2 as source directory.
However, when I want to create a new project with htdocs as a root folder, WebStorm sees the already created project.
Is it possible to create the project structure like I want?
Sure. But it involves additional manipulations.
The idea is simple -- store .idea folder (project settings .. and the clue/marker for IDE that this is a project) somewhere else:
Create new empty project somewhere else
Go to Settings/Preferences | Directories
Remove existing Content Root
Add new Content Root -- the folder(s) that you need.
You can A) add both folders as separate content roots (e.g. shared and project 1 as per your example) .. or B) add htdocs and then mark unwanted folders as excluded (so it's not indexed and not participating in code completion etc).
I suggest using A) option in general -- less files to work with for IDE (in B) -- even though the folders are excluded, they are still processed by IDE and can participate in certain activities).
Repeat the same for your 2nd project (for shared and project 2 folders)
https://youtrack.jetbrains.com/issue/WI-343 -- this ticket is for PhpStorm but describes the actual idea.
Alternatively:
Create project in project 1 folder (and not htdocs like you were planning originally)
Add additional Content Root -- add shared folder -- it will be listed as separate node in Project View.
Do the same for your 2nd project.
I am developing a C++ program using CMake as a Makefile generator. I have added the project as an existing source to the Netbeans and everything works nice except when I update lists of dependencies for my build targets.
Netbeans is able to get the new files added to the project, but keeps removed files hanging with a small yellow warning icon in the list of files. So the only way they could be removed is to manually in the GUI or by removing them from configurations.xml in the project.
As far as I understand the issue is about the way Netbeans scans for external changes. Is there a way to tell it to remove deleted files from the project?
You can try solutions mentioned here:
right click on your project in the "Projects" window,
click on "Properties",
click on "Ignored folders" in the left panel called "Categories",
click on "Add folder" and select the folders you want to ignore.
You can also clear the cache located in:
C:\Users\username\.netbeans\7.0\var\cache. //Deleting this directory should clear the cache for you.
To remove a file name with no file from my C++ static library project...
< File < OpenProject < "YourProject" (< means left click) (Leads To Projects.)
< Source Files > a.cpp < Remove File From Project (> means right click)
< Header Files > a.h < Remove File From Project (And the header file.)
I'm using netbeans 8.2. Curiously only c.cpp is listed under "Source files".
And only c.h is listed under "Header Files".
All the other (actual, real) source and header files are listed under "Important Files".