I am just a beginner at windows programming and was reading a tutorial about it.
It said something about resources for menu creation.
I am working in visual studio 2010 and would like to know how to create these resources (the turorial said something about adding them to the compiler which i could not understand) for simple things like menu bar creation.
Please help me.(Please keep in mind that I am a beginner therfore explain in detail if possible.)
To actually use the additional functionality you have to include the header and specify the directory where it is contained so the project can find the file
right click on project->properties
C\C++->general tab
the top element is Additional Include Directories - click the down arrow and specify the path to the header file
For your application to use the functionality you have to link with the lib
right click on project->properties
Linker->general tab
The 9th element from the top is Additional Lib Directories
& specify the path to the accompanying lib file
NOTE that the dll that corresponds (if dynamically linked) must be either in the system path or in the working directory of your application
under the linker -> input tab
you'll want to specify the name of the .lib file to load (the same as the file contained within the path you specify to link with with)
Alternatively - if the you'd like to make a project depend on another project within the same solution
right click the project->properties
the top tab is Common Properties
within that tab click the button "Add New Reference" and select the project
Related
https://github.com/gladosconn/ecdsa_cxxI have been trying to get this library into my project (C++ using Visual Studio 2022, in Windows) because I need to use the ecdsa signature algorithm, I have copied all the files in src folder to a folder called "ecdsa" in the src folder inside my project, and I didn't do anything with the test folders (I think that I don't need them since they're just tests), but then there are these files (.ytml) ,(.txt) ,(.py), I have no idea what am I supposed to do with them or where to put them, but I sure I need them because the program isn't working, it's giving me this error Cannot open include file: 'secp256k1.h': No such file or directory Libraries.Also I have done everything in the requirements section, my compiler supports C++11, and I have installed openssl, and I have CMake installed.This is my first time using anything from Github so I'm sure what to do.
In Visual Studio, right-click on your project in the Solution Explorer pane. From the menu that pops up, choose the 'Properties' item. It is usually at the very bottom. A dialog box will appear.
In the left pane of the dialog box, expand the options Configuration Properties > C++ > General. Now, in the right pane of the dialog box, probably at or near the top will be an item labeled 'Additional Include Directories`. Add the full path to the folder where you copied the source files from GitHub.
You may need to explicitly add ALL the files you downloaded from GitHub into your Visual Studio project.
Try compiling again.
Newbie to windows. I need to use yaml-cpp library in a project, but I can't seem to compile it in windows. I tried everything (everhthing!) I could find but no place have the full answer, just tips for the process. but those tips don't help so much.
I did create shared lib in Ubuntu but can't create dll in windows.
can someone give the full explanation to get dll from source code?
(I also be grateful for explanation of how use the dll with it's includes).
Working with visual studio 2015.
So finally I got it.
for linux users - use cmake. for windows users - you can but I really don't recommend it unless you need cross compiling. Use visual studio: (explained for VS 2017)
First create new project with existing code.
The folder you pick should be "src" (in case of cpp-yaml).
When creating the project you need to choose type of project (exe, dynamic or static library), so choose dynamic library to create .dll or static to create .lib.
After creating your project go to your project properties, go to c/c++ tab --> General --> "additional include directories", and add your path to the headers folder ("include"). Do not add "cpp-yaml" inside the include folder, only "include".
Now build. In the console you can see where the library was created.
To use it, in case you made static library 4 things need to be done:
add to your project "#include cpp-yaml/yaml.h"
in properties:
in tab "c/c++" --> General --> "additional include directories", add the include folder path. (as before)
in tab "Linker" -->Input, add to the "Additional dependencies" your lib name (followed by semi-colon)
in tab "Linker" --> General, add to "additional library directories" the path to your lib.
In my file explorer, my C++ project folders are like this:
... -> Documents -> C++ -> Files . . . . Projects
[In C++ folder, there are two more folders, called Files and one called Projects. I keep all my games/projects in the Projects folder. Each game has its own folder inside.]
Now here's the problem: I want all my common functions (.cpp & .h) to stay in one file folder, so if I ever change it, it changes for all my games. I want to keep these in Files. Is there a way to achieve this, like #include [Directory]? I know I can keep a file in its own game, but I want these to be all changed easily, and my code does not need to be transferred between computers. Thanks
This is not the right way to do it. If you have functionality that is shared between different applications (games, in your case), make a library from them and include that library in all your projects.
Solution for Visual Studio (2017)
For Source Files:
In the solution explorer right click on Sourcefiles and click "Add"/"Add existing" and choose your file(s)
Setting Include directory:
In the solution Explorer right click on your "Project" and click Properties
On the top set "Configuration" to "All Configurations"
Choose in the lsit on the left "VC++ Directories"
Click on the Dropdown arrow on the row with "Include directories" (you might have to click once on the row for the arrow to appear
Click "edit"
Add one line for each include directory. Use the folder icon on the top to open the file explorer to choose the directories
Currently, when working on a new solution in Microsoft Visual Studio 2017 (C++), my team has to include a bunch of libraries and directories individually. Which is tedious and prone to mistakes. Is there anyway to be able to include one path(Environment Variable) in "Additional Include Directories" that contains all the paths to the "Includes" we need without individually including each and every path or any other solution? Right now, when we create a new solution we have to repeatedly add every solution individually.
Go to view->Other windows->Property manager and then open one of the project nodes and then one node for each of the platforms of interest (that is Debug|Win32, Debug|X64), and right click on the Microsoft.Cpp..User node and select properties.
Now, you can edit this property page just like a project properties but the settings will be applied to all projects (even already created projects).
I've been following the tutorial from msdn and it just doesn't work.
First problem I have is that sometimes the .dll and .lib aren't built. Instead I only get .objs. Whenever I build the .dll project, it gives me a popup asking to "please specify the name of the executable file to be used for the debug session". I was told to change my startup project to one with a main function, but then the .dll doesn't get built. This happens both using the default VS configuration and simply adding some lines or following the step-by-step guide at msdn.
When the .dll and .obj are built - God knows how - I can't get them to be recognized. I've tried putting them and the .h in the project folder, but then I get an error about the .dll function being undefined. Following the msdn link, at one point it says:
To use the math routines that were created in the dynamic link library,
you must reference the library. To do
this, select References… from the
Project menu. On the Property Pages
dialog box, expand the Common
Properties node, select References,
and then select the Add New Reference…
button. For more information about the
References… dialog box, see Framework
and References, Common Properties,
Property Pages Dialog
Box.
The Add Reference dialog box is displayed. This dialog lists all the
libraries that you can reference. The
Project tab lists all the projects in
the current solution and any libraries
they contain. On the Projects tab,
select MathFuncsDll.
If I go Project > Test Properties > Common Properties I can only find the subitem "Framework and References". There is no "References..." There is an "Add new Reference..." button, but that doesn't let me add anything. The other button, "Add Path..." doesn't make any difference even when I set it with the directory with the files. The following steps don't work either.
I've also tried to add the name of the file at the Linker, but then it says it couldn't find the .obj file.
I have no idea where to go from here. I been stuck on this for hours and nowhere has a solution for this.
Is there a step-by-step guide anywhere that actually works for VS2008?
firstly your description is mixing managed (.net) things with normal c++ stuff. I assume you are doing normal c++ stuff.
DO you own (I mean have the source; are the author) both the DLL and the calling program? If so you should have 2 VS projects one for the DLL and one for the program. You should set the program as the startup project. This will make the debugger behave correctly
IN order to get the build right you need to make the c++ program depend on the dll project. There is a Project | Project dependies dialog that will do this for you, set the program project to depend on the dll project
If you only own the DLL then you need to go to the project properties | debug and tell it what binary to run to call your DLL.
If this is managed c++ then its a whole different storty
Try to specify Project Dependencies between your DLL project and project of application that uses the DLL.
The References settings are dedicated to .NET projects.