I would like to know how to find the source files for visual studio projects as I need to upload my projects for marking, I received the message is quotes below from my teacher but I am not sure where to find the .cpp and the .h / .hpp files in my visual studio project/lab folders. I am assuming with just these files he will be able to open the projects in programs other than visual studio?
"Please just upload the source files if you can (.cpp and .h / .hpp file) – I don’t require additional Visual Studio Packages etc."
Thanks
By default your projects are stored in "%UserProfile%\Documents\Visual Studio 2015\Projects" or similar depending on your version of IDE (ie. which Visual Studio version You use).
Assuming your project is named Project1, it's directory will be named the same and within this directory you will find yet another directory with the same name (so in default scenario it will all sum up to "%UserProfile%\Documents\Visual Studio 2015\Projects\Project1\Project1". Within this directory you shall find source (.c, .cpp) and header (.h, .hpp) files.
In most cases those files contain all the work you've done on the project. Most of other files populating project directory are non-essential, template, auto-generated or debug/release process products or by-products.
Hence to examine and judge what was written in programming language or rebuild your project in any other IDE or outside of IDE, those files would be all that's necessary.
Related
I'm new to programming I use visual studio 2019 and when I'm creating a new project the project's name always end with .Sln instead of .cpp
.sln is the file visual studio uses to organize the project. I believe you will find one or multiple .cpp files in your project directory.
.sln is a diminutive for solution, it's a Visual Studio executable that has some basic configurations like the VS version you are using, the project id, name, and things like that, as you execute this, it will open your .vcxproj that has all the global configurations of the project, .cpp file names, etc. and will open your project. If you look in your project folder you should have at least a .cpp file.
SLN is the solution file. It is used to compile the solution and other informations. You can add classes (.cpp/.h) in your project where you can write C++ code.
My directory structure seems to be messing up the auto-complete for project created files. Here's a hierarchical representation (The project is called "Asdf"):
Asdf
src
Asdf (Contains the source files for the project.)
SDL (Contains include files for SDL.)
vc (Contains the actual visual studio solution file and configuration files.)
Any ideas on how to fix this?
Additional note: Project files are included in Project Properties->Include Directories. The Visual studio 2013 is the software in question.
I mostly worked with linux env, new to visual studio. (If you are in Linux, you would use the make utility...) How do you compile and run a project in Visual Studio when you have multiple source and header files involved in the same project? I have main.cpp, and few other source and corresponding header files, and when i built the project, I couldn't see an output although the project compiled fine and 'exited gracefully'. How do I tell Visual Studio that these files are part of the project?
To do that:
Select Project -->
Add Existing Item....
You should be looking in the same directory where you saved the project/solution.
Highlight the .h and .cpp files: date.cpp, date.h and main.cpp
Select "Add" to add the files to the project.
Result: Once I added the 'main.cpp' and other files in the project, it works fine and I am able to view the output.
References:
1 [http://www.cs.uregina.ca/Links/class-info/210/Lab1_VCIntro/]
I downloaded the visual2008 file from here(http://luaplus.org/projects/luaplus/files), but I don't know how to add it to my project. It's not like the other libraries where I just had to add the include directory to my Visual Studio folder and the bin to my system32 or project folder. There are no header files either. I'm using Visual Studio 2010 professional.
I remember downloading LuaPlus for the first time and thinking the same thing--"Where are the headers?" What you'll want to do is just clone the repository located on GitHub and use that to build LuaPlus yourself. The author helpfully included batch files to create different project files (incl. VS2010). You can then use the project files to build LuaPlus and you'll naturally also have the headers & source files as well. I don't recall if it included Lua's source already or if you have to do it yourself manually (this only takes a minute to do, however).
This could be a very silly question to any long time C++, visual studio or live555 users but I am having problems building the live555 source code with visual studio 2005. I have found a good walk through guide for creating the projects manually because .mak files are no longer supported by newer versions of visual studio but am still having problems. It seems that visual studio cannot open the .hh files that come in the include folders and I have added to the header folders of each seperate project.
Is there something special you have to do to the compilier or a plugin for the IDE to allow VS2005 to open .hh header files?
This is the error I am getting:
fatal error C1083: Cannot open include file
'BasicUsageEnvironment.hh': No such file or directory.
It seems to me that Visual studios cannot find the file, rather than it not being able to open that file type. If you right click on your project and go to
Properties->C/C++->General->Additional Include Directories
Now browse to the location of the .hh file and add it to the path. Visual studios should now be able to find the file in question. You may also have to add library paths to your solution. Please let me know if there are additional errors.