I'm new to Windows development, having messed around in Linux for a while. I need to access console functions and am having trouble getting a comprehensive list of console text attributes off the web. I would like to read wincon.h and windows.h to get the info, but I can't figure out how to get at them. Help please!
Windows does not come with these by default. If you are looking for them, you need to install the Windows SDK and dig around in the %PROGRAMFILES%\Microsoft SDKs\Windows directory.
They're normally stored along with the other SDK headers. Assuming you're using Visual Studio, the easy to look at them is to create a file, add a line to #include the file you care about, right click it, and click on the open document <whatever.h> line in the pop-up menu.
You'll have to install the Windows SDK to get the header files. Windows doesn't come with the software development tools out of the box and depending on which compiler you're using, they might not come with the compiler either.
I would try looking up the console function listing on MSDN
Related
The prefix header functionality in Xcode comes in handy quite often and I was wondering if other IDEs provide a similar functionality? Or is there even a way on compiler level?
I've been looking for this in other environments for quite a time and the only thing I could find were precompiled headers. But that's not really the same as you still need to include the header file in each source file.
So, does anyone know if there's a way to configure prefix headers in IDEs like Visual Studio or QT Creator?
For VC++ you can specify Forced Include File using option /FI on command line or through an IDE. An excerpt from MSDN:
To set this compiler option in the Visual Studio development
environment:
1. Open the project's Property Pages dialog box.
2. Click the C/C++ folder.
3. Click the Advanced property page.
4. Modify the Force Includes property.
For QtCreator you can add two lines to your *.pro file:
CONFIG += precompile_header
PRECOMPILED_HEADER = stdafx.h
Of course, you can type any name instead of "stdafx.h"
I am using eclipse and would like to integrate some sort of version control. Ideally, I do not want to use a plugin. I would really like to somehow write the version to a text file in some way.
The reason I would like to do this is because I have a program that needs to track the current version of the workspace. Right now I am manually creating a text file in the workspace folder called "Version.XXXX" and just reading the name of the file to get the version number. However, I would like to somehow have eclipse do this automatically in case I forget to make the text file manually.
Any help or suggestions is greatly appreciated. Thanks!
If you want a simple source version control system I suggest you use Mercurial. All the versioning information is stored in the root folder of your project in a .hg folder. There is no server and log-ins. Like SVN and Git, it has gui support from Tortoise and plug-in for your IDE. The logic and commands behind it are similar to other solutions.
I just installed Eclipse CDT. Now, Eclipse works fine for me with Java, but it's not working at all with C. I'm trying to write a simple Hello World program, and I've even loaded the Hello World ANSI premade project. However, regardless of what I do, I get a "Unresolved Inclusion: _" error on all my #include.
I've looked around for half an hour trying to figure out why, installed MiniGW and tried a ton of different configurations. Can someone tell me how to fix this? I'm guessing it's because Eclipse has no idea where the .h files are. How do I set this?
I'm on Windows 7.
Thanks!
Go to the project property (right click on the project in the left panel) then C/C++ General then Paths & Symbols.
You can configure the include paths in the Include tab (the first one normally).
The include paths must be something like $MINGW_DIR/include or something like that (can't be more precise, for me it's /usr/include so...)
My VS2010 doesn't stop at breakpoints inside of silverlight application. It appears that no symbols for it have been loaded during debugging. When I hover over the break point it says "The braekpoint will not currently be hit, no symbols have been loaded".
I have tried all of possible solutions offered by google and have no success. The problem occurs even when I create brand new silverlight app hosted by an ASP .NET web project. All of my project configuration looks fine - silverlight debugging is enabled in the Web project.
I am using silverlight 4.
here a link to the sample project created out from the tepmlate.
Any thoughts ?
P.S I just tried to reinstall VS2010 and the problem still exists.
EDIT: I just tested the same project on another machine and it stops at the break point it seams that the problem is somewhere in the configuration of VS or silverlight.
with Matt Dotson's help I managed to attach the debugger manually. However this solution is not good enough for daily use.
Depending on my experience in Silverlight following these steps keep your project debug-gable.
Condition 1>
Firstly we need to be ensure that in Web Project's properties there is a Web section, as you see below Silverlight checkbox must be checked.
Condition 2>
Follow In Menu Debug => Attach Debugger>
Visual Studio sometimes can't attach debugging platform you need to lead the way :) . By this way you may debug other platforms,(also you may debug your product platform but pdb files must be sync and don't forget you may suspend your product platform using this).
Condition 3> Your default web browser may be Firefox,Chrome or other than IE.By Visual Studio default try to attach to IE. But when you run VS calls default browser,so you need to have a manual attachment in Condition 2 or set your default browser by right clicking on default page > Browse with .
Condition 4> There is xap file generally located in web project\ClientBin directory. Sometimes after build operations this file can't be replaced and your ProjectDll and your Project PDB files not be sync. This cause wrong line match while debugging or can't find a debugging file attached caution. I strongly suggest delete all generated files in Bus project and delete Clientbin\ProjectName.xap file. After rebuild all it must be ok!
Hope helps.
What broswer are you using? You need to be using Internet Explorer to debug silverlight projects.
I have had a similar frustrating experience with this but in my case the solution was very simple. It seems that somehow, and I really have no idea how, the debugger option for Silverlight had become unchecked in the properties on the hosting ASP.NET project.
I just assumed that as I had been previously debugging, this option was set and I didn't bother to make sure that this was this case. Just goes to show that one should always check the basics first; if I had done that it would have saved me some time.
To check this in VS2010, right-click on the project and select properties, change to the Web tab and check the Silverlight option at the bottom of the page, in the debuggers section.
Also see the debugger to a silverlight process
http://msdn.microsoft.com/en-us/library/cc838267(VS.95).aspx
If that doesn't work, then
reset iis (if you are debugging in that)
delete temporary asp.net files (%SystemRoot%\Microsoft.NET\Framework\versionNumber\Temporary ASP.NET Files)
clean and rebuild your solution
The resolution came after 2 days of headbanging. It appears that the link which Malcolm gave covers exactly my problem but my I was narrow-minded enough not to pay it enough attention because when I run the debugger as long with the app my default browser was FF. So I thought that after the FF starts I can load the page from IE or Chrome.
Actually the problem is that the debugger cannot be attached to the silverlight project because of the FF. And when I load the app from IE or Chrome the debugger dis still not attached.
Thanks to everyone that tried to help.
if you have multiple project, Rebuild the project separately that you want break point. Its work for me
Try also picking internet explorer from browser list menu as your browser
In VS 2008, I used to be able to create a file on the file system (like a .cpp file, for example), and then I could click the refresh button in VS and the file would show up. I have "Show All Files" checked. Note by "create a file on the filesystem" here, I mean like going out to windows explorer and creating a new file, in other words, outside of the IDE.
However, in VS 2010, this doesn't work. I have to close and re-open the solution or it won't see the file, even if I click the refresh button. I realize I can add the file through "Add New Item" and that works fine, but I use the technique above when competing in programming contests, that is, I have a separate tool which creates the file on the file system, and then I can just refresh the file list in VS and see it.
It's not a showstopper, but it's pretty annoying nonetheless. Just wondered if anyone knew a workaround for it. It's a C++ project I'm working with.
EDIT
Also, this problem seems to be isolated to C++ projects, I just tried it with a C# console app and the refresh works ok.
EDIT2
I put an issue for this on the Microsoft connect site. I don't know if it will get any response, but I figured it's worth a shot. Here's the link.
The only time I've ever seen "refresh" do this is in web site projects.. and I found it annoying that it would automatically include stuff ;).
In web apps, which is now the default, you have to click on the Show Hidden Files icon, then right click on the new file and say "include in project"
I put an issue for this on the Microsoft connect site (see EDIT2) in original question for details. MS has acknowledged that they can duplicate the problem, so hopefully they will resolve it in SP1. It does seem to be a bug.