I'm trying to create a new C++ project in VS 10, and can't even get an empty project to load from the template. I get an error...
The "exists" function only accepts a scalar value but its argument "$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" evaluates to "{~}" which is not a scalar value.
The {~} value is what I have stored in the LOCALAPPDATA variable in the computer Environment Variables, concatenated with "\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props" at the end.
I'm reluctant to go changing any template files without understanding what's going on.
Well, it looks like Windows XP doesn't provide any default value for this variable and "~" is definitely not a valid directory on your PC. Try to set it as described here, and maybe you'll get lucky. VS2010 had some bug related to this. Perhaps you also need to upgrade it to SP1.
The links provided by #Mihai gave the information I needed to find a solution. The problem was that LocalAppData didn't have the value it was looking for (just what the error message says). I couldn't change that data because other apps had modified it for their own purposes (the value wasn't "~", that was a placeholder for this post).
Instead, I opened the .vcxproj file in Notepad, and modified the ImportGroup nodes causing the error. Instead of the attribute:
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
... it now reads
Condition="exists('$(UserProfile)\Local Settings\Application Data\Microsoft.Cpp.$(Platform).user.props')"
The project now loads.
Related
I'm learning C++ and am redoing a tutorial that I did before. I deleted the project folder and recreated it. I right clicked on the solution, clicked Add Class and entered my class name, but I get the error that 'Object 'X' already exists' even though I deleted the previous folder. I'm just learning C++ so I guess I don't understand how C++ creates objects.
Probably some stored data are still there from the previous project.
1st solution: I would suggest you to change from the name tag, your project name. Maybe something was still there.
Then, second option: restart Visual studio
2nd solution: Watch also to the solution explorer, if there are hidden folder named as your class name. If so, delete them and create the class again
Let me know.
To solve this problem I created a file with the name that did not work via windows explorer in my project folder. I then dragged the file into visual studio and it worked.
When I create a new file in a webstorm project I get a superfluous message telling the next person 'who made the file and when'. Since the invention of source control I really don't see why jetBrains have decided to make this default anyway how do I turn it off?
This is probably because you have USER and DATE as part of your file template:
Just get rid of the the stuff in the template and you should be good to go. In other words, get rid of 3 and 4, and you will no longer be prompted.
Usually webstorm will not prompt you for this, but for some reason in the installation the username was not added to its list of macros.
The docs say this should work:
bool did=pixmap.save( "hoppy.png" );
qDebug("did is: %d",did);
My logging returns 1 suggesting, as per docs, that the save was successful. However, no file appears on my drive. According to the docs, this save() should indeed save a file, so what is missing?
According to the docs, this save() should indeed save a file, so what is missing?
Nothing missing; it is simply saved to the folder of where you run the qt executable from. If it is a direct invocation, then it is beside the executable, otherwise it is beside the script or other program that calls the qt executable (sure, the other program could modify the current working directory, but let us forget about that for a bit).
If that is not what you would like to do, you better use an absolute path to the location where you wish to save it. However, if it is some common location, consider using QStandardPaths.
Another answer notes:
Nothing missing; it is simply saved to the folder of where you run the qt executable from
However my question indicated that this is actually not the case here.
Using the full path rather than a relative path or instead of using the ~ character, resolved it.
I am trying to migrate a VS 2005 project to VS 2012. But it reports the following error.
The "HasTrailingSlash" function only accepts a scalar value, but its
argument "$(IntDir)" evaluates to
"C:\Users\Mahesh\HelloWorld_obj\DebugW7-Win32;\" which is not a
scalar value. C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.targets
I understand its a string literal and not a scalar value. But how to resolve the issue. Can anyone please share your ideas. Googling didn't help much.
Failed attempt : Though changing the delimeter to / from ; for the macro serving as intermediate directory in the property sheet did not work.
Success: I opened the property sheet in Notepad and removed the following lines for the user macro "ObjOut" which serves as an intermediate directory for my project.
InheritsFromParent="true"
Delimiter=";"
The same can be achieved via IDE as well when "Macro inherits from parent property sheets" is unchecked for the macro.
Hope this is useful to someone in future. I posted the same on MSDN forum as well.
This code:
<cfimage action="info" structName="imageInfo" source="#imagePath#">
is giving this error:
The attribute 'structName' is required for the tag. (Found:
[source, structname, action])
When I run this code in CFBuilder - everything is OK, but I must use CFEclipse.
What should I do (I use CF9)?
Thank you for your answers!
Of course this problem won't prevent you from running your application on ColdFusion. It is just an IDE warning that something is wrong.
You have a few options.
Try using a lowercase N in structName. i.e. structname. ColdFusion is not case-sensitive, but Java is, and CFEclipse is a Java application.
If that does not work, then it probably means that the dictionary file that drives the code assist is not correct. You can go earch forthose XML files and update them to include that attribute.
You can use CFBuilder. I know you said you can't, but I have to question why. You know there is a free version that is just as good as CFEclipse, right?
The problem is that there's a casing glitch in that file Peter mentions. There's one reference to "structName" to define the attribute itself, and another "structname" which is in the list defining which attributes are needed for action="info". If you make them both the same, then restart Eclipse, you should be OK (that's I've needed to do to make the error indicator go away).