|
You do not need to move it anywhere; just add it back in to the project. Once you have all the files correctly included in the project you can rebuild it and start looking at any residual errors.
Note: adding files into a project does not move them physically, it just builds a list in the Visual Studio Project settings.
|
|
|
|
|
I tried that didn’t pick up my changes don’t think there is anybharm in remove / delete and then pasting and add / existing
Thank.
|
|
|
|
|
It's a waste of time. If it does not correctly add the files that are already present, then removing and restoring them will make no difference. Unfortunately we cannot see your system so cannot be certain if there is something else missing from your project settings. If you could post your .vxproj and .vxproj,filters files from the project folder, we may be able to spot something.
|
|
|
|
|
thanks for the offer
but looks too big of a job here is the project below is the filters maybe if takes a few minutes thanks
<project defaulttargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<itemgroup label="ProjectConfigurations">
<projectconfiguration include="Debug|Win32">
<configuration>Debug
<platform>Win32
<projectconfiguration include="Release|Win32">
<configuration>Release
<platform>Win32
<projectconfiguration include="Debug|x64">
<configuration>Debug
<platform>x64
<projectconfiguration include="Release|x64">
<configuration>Release
<platform>x64
<propertygroup label="Globals">
<vcprojectversion>16.0
<projectguid>{78197285-AA04-442D-9595-B4B8F59B97DF}
<keyword>MFCProj
<rootnamespace>DriveStorage
<windowstargetplatformversion>10.0
<import project="$(VCTargetsPath)\Microsoft.Cpp.Default.props">
<propertygroup condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" label="Configuration">
<configurationtype>Application
<usedebuglibraries>true
<platformtoolset>v142
<characterset>Unicode
<useofmfc>Dynamic
<propertygroup condition="'$(Configuration)|$(Platform)'=='Release|Win32'" label="Configuration">
<configurationtype>Application
<usedebuglibraries>false
<platformtoolset>v142
<wholeprogramoptimization>true
<characterset>Unicode
<useofmfc>Dynamic
<propertygroup condition="'$(Configuration)|$(Platform)'=='Debug|x64'" label="Configuration">
<configurationtype>Application
<usedebuglibraries>true
<platformtoolset>v142
<characterset>Unicode
<useofmfc>Dynamic
<propertygroup condition="'$(Configuration)|$(Platform)'=='Release|x64'" label="Configuration">
<configurationtype>Application
<usedebuglibraries>false
<platformtoolset>v142
<wholeprogramoptimization>true
<characterset>Unicode
<useofmfc>Dynamic
<import project="$(VCTargetsPath)\Microsoft.Cpp.props">
<importgroup label="ExtensionSettings">
<importgroup label="Shared">
<importgroup label="PropertySheets" condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<import project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" label="LocalAppDataPlatform">
<importgroup label="PropertySheets" condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<import project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" label="LocalAppDataPlatform">
<importgroup label="PropertySheets" condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<import project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" label="LocalAppDataPlatform">
<importgroup label="PropertySheets" condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<import project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" label="LocalAppDataPlatform">
<propertygroup label="UserMacros">
<propertygroup condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<linkincremental>true
<propertygroup condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<linkincremental>true
<propertygroup condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<linkincremental>false
<propertygroup condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<linkincremental>false
<itemdefinitiongroup condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<clcompile>
<precompiledheader>Use
<warninglevel>Level3
<sdlcheck>true
<preprocessordefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)
<precompiledheaderfile>pch.h
<subsystem>Windows
<midl>
<mktyplibcompatible>false
<validateallparameters>true
<preprocessordefinitions>_DEBUG;%(PreprocessorDefinitions)
<resourcecompile>
<culture>0x0409
<preprocessordefinitions>_DEBUG;%(PreprocessorDefinitions)
<additionalincludedirectories>$(IntDir);%(AdditionalIncludeDirectories)
<itemdefinitiongroup condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<clcompile>
<precompiledheader>Use
<warninglevel>Level3
<sdlcheck>true
<preprocessordefinitions>_WINDOWS;_DEBUG;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)
<precompiledheaderfile>pch.h
<subsystem>Windows
<midl>
<mktyplibcompatible>false
<validateallparameters>true
<preprocessordefinitions>_DEBUG;%(PreprocessorDefinitions)
<resourcecompile>
<culture>0x0409
<preprocessordefinitions>_DEBUG;%(PreprocessorDefinitions)
<additionalincludedirectories>$(IntDir);%(AdditionalIncludeDirectories)
<itemdefinitiongroup condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<clcompile>
<precompiledheader>Use
<warninglevel>Level3
<functionlevellinking>true
<intrinsicfunctions>true
<sdlcheck>true
<preprocessordefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)
<precompiledheaderfile>pch.h
<subsystem>Windows
<enablecomdatfolding>true
<optimizereferences>true
<midl>
<mktyplibcompatible>false
<validateallparameters>true
<preprocessordefinitions>NDEBUG;%(PreprocessorDefinitions)
<resourcecompile>
<culture>0x0409
<preprocessordefinitions>NDEBUG;%(PreprocessorDefinitions)
<additionalincludedirectories>$(IntDir);%(AdditionalIncludeDirectories)
<itemdefinitiongroup condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<clcompile>
<precompiledheader>Use
<warninglevel>Level3
<functionlevellinking>true
<intrinsicfunctions>true
<sdlcheck>true
<preprocessordefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)
<precompiledheaderfile>pch.h
<subsystem>Windows
<enablecomdatfolding>true
<optimizereferences>true
<midl>
<mktyplibcompatible>false
<validateallparameters>true
<preprocessordefinitions>NDEBUG;%(PreprocessorDefinitions)
<resourcecompile>
<culture>0x0409
<preprocessordefinitions>NDEBUG;%(PreprocessorDefinitions)
<additionalincludedirectories>$(IntDir);%(AdditionalIncludeDirectories)
<itemgroup>
<clinclude include="..\..\DBGR\DBGR\DBGR\CModalStorage.h">
<clinclude include="..\..\DBGR\DBGR\DBGR\CStorge.h">
<clinclude include="CModalStorage.h">
<clinclude include="CPie.h">
<clinclude include="CStorge.h">
<clinclude include="DriveStorage.h">
<clinclude include="framework.h">
<clinclude include="MainFrm.h">
<clinclude include="pch.h">
<clinclude include="PieWnd.h">
<clinclude include="Resource.h">
<excludedfrombuild condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false
<clinclude include="targetver.h">
<itemgroup>
<clcompile include="..\..\DBGR\DBGR\DBGR\CModalStorage.cpp">
<clcompile include="..\..\DBGR\DBGR\DBGR\CStorge.cpp">
<clcompile include="CPie.cpp">
<clcompile include="CStorge.cpp">
<clcompile include="DriveStorage.cpp">
<clcompile include="MainFrm.cpp">
<clcompile include="pch.cpp">
<precompiledheader condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create
<precompiledheader condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create
<precompiledheader condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create
<precompiledheader condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create
<clcompile include="PieWnd.cpp">
<itemgroup>
<resourcecompile include="DriveStorage.rc">
<itemgroup>
<none include="res\DriveStorage.rc2">
<itemgroup>
<import project="$(VCTargetsPath)\Microsoft.Cpp.targets">
<importgroup label="ExtensionTargets">
Project filters
<project toolsversion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<itemgroup>
<filter include="Source Files">
<uniqueidentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}
<extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
<filter include="Header Files">
<uniqueidentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}
<extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
<filter include="Resource Files">
<uniqueidentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
<extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
<itemgroup>
<clinclude include="DriveStorage.h">
<filter>Header Files
<clinclude include="framework.h">
<filter>Header Files
<clinclude include="targetver.h">
<filter>Header Files
<clinclude include="MainFrm.h">
<filter>Header Files
<clinclude include="pch.h">
<filter>Header Files
<clinclude include="..\..\DBGR\DBGR\DBGR\CStorge.h">
<filter>Header Files
<clinclude include="PieWnd.h">
<filter>Header Files
<clinclude include="CPie.h">
<filter>Header Files
<clinclude include="..\..\DBGR\DBGR\DBGR\CModalStorage.h">
<filter>Header Files
<clinclude include="Resource.h">
<filter>Header Files
<clinclude include="CStorge.h">
<filter>Header Files
<clinclude include="CModalStorage.h">
<filter>Header Files
<itemgroup>
<clcompile include="DriveStorage.cpp">
<filter>Source Files
<clcompile include="MainFrm.cpp">
<filter>Source Files
<clcompile include="pch.cpp">
<filter>Source Files
<clcompile include="..\..\DBGR\DBGR\DBGR\CStorge.cpp">
<filter>Source Files
<clcompile include="..\..\DBGR\DBGR\DBGR\CModalStorage.cpp">
<filter>Source Files
<clcompile include="PieWnd.cpp">
<filter>Source Files
<clcompile include="CPie.cpp">
<filter>Source Files
<clcompile include="CStorge.cpp">
<filter>Source Files
<itemgroup>
<resourcecompile include="DriveStorage.rc">
<filter>Resource Files
<itemgroup>
<none include="res\DriveStorage.rc2">
<filter>Resource Files
<itemgroup>
<filter>Resource Files
<filter>Resource Files
|
|
|
|
|
It looks OK, assuming the list contains all of the files you expect to be included. However, I notice you have two versions of two source and header files: CModalStorage and CStorge, and wonder if that is a cause of confusion.
|
|
|
|
|
Thanks Richard I got rid of it have to fix up a few other things thank you
|
|
|
|
|
Hi
I have a header file which is not being read. It happens to be the resource.h. its in the same directory where all of my headers are
as an example I defining three controls in my modal dialog box defining and validating them thru DDX/DDV 2 out of the 3 get the siguligly red underline
When I copy the #define to the .cpp file it goes away
even more strange my .rc file recognizes the #defines when I #include "resource.h"
|
|
|
|
|
I bet it has a comment line
at the very beginning. If so, IntelliSense will not reload the file every time it changes. For more details see: TN035: Using Multiple Resource Files and Header Files with Visual C++ | Microsoft Docs[^] Quote: Visual C++, circumvents the dependency on RESOURCE.H by including the following comment as the first line of the RESOURCE.H file:
h
//{{NO_DEPENDENCIES}}
The development environment interprets this comment by ignoring the changes to RESOURCE.H so that dependent .CPP files will not need to be recompiled.
The quick fix is to right-click on the file and select "Rescan > Rescan File"
Mircea
|
|
|
|
|
you are correct however when I right click on the file in solution explorer dont see rescan
|
|
|
|
|
I got it right click on the actual file I see rescan -> rescan file however didnt work
|
|
|
|
|
Hmm, might be related to the VS version. I'm on VS2019 16.11.8 and just checked: every change in the .h file (comment and uncomment a symbol the .h file) is immediately reflected in the .cpp file although the .h file has //{{NO_DEPENDENCIES}} at the beginning.
The only case where IntelliSense gets confused is if I revert changes ("Git > Undo Changes"). In this case however "Rescan" will pick-up the changes.
OTOH I'm very sure I used to need "Rescan" for resource ID changes so maybe it's something that has recently changed in IntelliSense.
Mircea
|
|
|
|
|
I am on VS 2019 16.11.8 My windows program is a client to a z/os mainframe machine. I am down to the final component and I wrote a stand alone VS 2019 project because testing the code I building would require an ipl on the z/os machine most everytime
What I am trying to say I am going to carry over these changes to my windows MFC client when I am done including copying over the .rc entries and resource.h file for some reason the that Project solution I dont run into this problem
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
Member 14968771 wrote: error: unknown type name 'num'
That's pretty clear, I think. But here's the scoop - when pulling arguments out of a va_list , the second argument to va_arg is a type , not a variable name. So in your case this should be
QString s;
for(int i = 0; i < num; ++i)
s = va_arg(args, QString)
Keep Calm and Carry On
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
This is the mechanism that printf() uses to pass mixed arguments in, so its definitely doable. printf uses its format string to help unpack the argument list, but there are other ways. You could use a simplified format string like "sddi" , showing that the unspecified arguments are a string , two double s and an int . Another option might be to use an indicator e.g
#define ARG_INT 1
#define ARG_LONG 2
#define ARG_DOUBLE 3
#define ARG_CHAR 4
#define ARG_STRING 5
#define ARG_END -1
int var_arg_fn(int arg, ...)
{
va_ist args;
va_start(args, arg);
while(arg != ARG_END) {
switch(arg) {
case ARG_INT :
{
int i = va_arg(args, int);
break;
}
case ARG_DOUBLE :
{
double d = va_arg(args, double);
break;
}
default:
}
arg = va_arg(args, int);
}
}
var_arg_fn(ARG_INT, 1, ARG_DOUBLE, 3.2, ARG_STRING, strvar, ARG_END); I'm sure if you think about it, you can come up with something that suits your needs.
But since you're using C++ now might be the time to venture into the world of variadic fuction templates . Google for that and check out one or more of the tutorials and/or examples. It might be a better fit than trying to wrap things back down to C stdargs .
Update: Here's a video on variadic templates that may help
C++ Weekly - Ep 6 Intro To Variadic Templates - YouTube
Keep Calm and Carry On
modified 9-Jan-22 18:37pm.
|
|
|
|
|
Where is i used in the call to va_arg ?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Its only used as a loop counter. If you prefer we could do
while(num--)
{
s = val_arg(args, QString);
} That, of course alters the value of num, so if you need to know how many args were passed in, or need to traverse the argument list again, you don't want to do that.
Keep Calm and Carry On
|
|
|
|
|
Message Closed
modified 15-May-23 19:07pm.
|
|
|
|
|
Member 14968771 wrote: PS I did post same request on QT forum
Given the complete lack of detail in your "question", you'd have better luck posting it on a "psychic hotline" forum instead.
Even people who are "familiar with QT Bluetooth CODING" can't guess what your secret code is doing, nor what the secret problem is.
If you want someone to help you, you need to start by asking a proper question, with enough details to explain the problem and to show the relevant parts of your code.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
is there how to work on google even knowing any programming language variation?
|
|
|
|
|
Uhh... what?
And what does this have to do with C/C++?
|
|
|
|
|
Not with those types of questions.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
If you're looking for work at Google or another international (and especially US-based) company, you should work on your grasp of the english language first.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Hi
I have a question regarding the pie method in CDC there are eight parms the first 4 represent the bounding rectangle in which the ellipse or the circle is enclosed the last 4 represent the starting and ending points and of the arc
my question is for the last 4 why is the "Y' vertical parm necessary it would always seem to be from the center of the arc to its edge
I hope my question makes sense
thanks
|
|
|
|