How can I open "Project structure" in CLion? It's supposed to be under "File", but it's not. There's also a keyboard shortcut: Ctrl+Shift+Alt+S, but that doesn't work either.
Related
I'm using Visual Studio 2022.
There is no Copy to Output Direcotry for files in Solution Items folder. But, this option does exist for files within a project.
Is there a way to make this happen instead of adding those files to a project or adding "xcopy..." to "Post-build event" for each project's page property?
Copied an existing working report.
Got the error "The report definition for report 'Report1' has not been specified". Tried some other suggested fixes, but they were not working for me. Finally noticed an associated error of could not find file '\bin\debug\reports\AdminReports\Report1.rdlc'.
Found it.
The rdlc file had:
"Build Action" = "Embedded Resource";
"Copy to Output Directory" = "Do not copy"
FIXED to:
"Build Action" = "Content";
"Copy to Output Directory" = "Copy if newer"
Reason: Copying files associated with working report and renaming unbeknownst to Visual Studio and doing Add Existing resulted in incorrect default property settings.
I want VS to create subfolders in release directory with some linked files from project. Something like this:
Project/
-bin/
--Relase/
---program.exe
---Resources/
----input.txt
---Config/
----default.conf
How can I do this while having files "input.txt" and "default.conf" in solution hierarchy?
Heh, it's easy: just place needed items inside project in solution explorer and in properties window change property "Copy to output directory" to "Copy always" or "Copy if newer" .
I am trying to configure NTL library in my first Visual Studio 2010 project. I am following the instructions from: http://www.shoup.net/ntl/doc/tour-win.html
I created a new Win32 project, named ntl.
Then, from Project -> Add Existing Items and selected all the files in the src file NTL library folder.
Then, I clicked in Project -> Properties -> Configuration Properties -> C/C++ -> Additional Include Directories and I selected the include directory in the NTL library folder.
Finally, I tried to Build-> Build ntl but I am getting error says (for every file in the src):
c:\program files\winntl-5_5_2\src\ctools.cpp(2): fatal error C1083: Cannot open include file: 'NTL/ctools.h': No such file or directory
1> Generating Code...
Simple, follow this help step by step Compiling NTL.
You must be doing something wrong, follow the instructions step by step it will work.
Save NTL in a path like it : C:\Library\WinNTL-5_5_2, and follow instructions of site.
you probably don't need the answer for this question, but maybe for others who want to do it.
In Visual Studio (2010):
'File' -> 'New' -> 'Project...' (or Ctrl + Shift + N)
Choose 'Win32 Project' (located under 'Installed Templates' -> 'Visual C++'), I named it NTLlib, click 'Ok'
Click 'Next >', Application type: 'Static library', in Additional options: uncheck 'Precompiled header', click 'Finish'
Right-click on created project in Solution Explorer 'Add' -> 'New Item...', (or Ctrl + Shift + A) choose C++ File (.cpp) name it and click 'Add' (it is necessary to set the C/C++ settings)
Download the latest NTL library, extract it in your project
Right-click on your project go to Properties (or Alt + Enter) in 'Configuration Properties' -> 'C/C++', click on 'Additional Include Directories' from Dropdown menu choose edit -> 'New Line' (yellow Folder) -> set path to the downloaded NTL library include folder (no folder in include folder), click 'OK'
Right-click on your project in Solution Explorer 'Add' -> 'Existing item...' (or Shift + Alt + a), and select all files from downloaded NTL library in src directory click 'Add'
After loading all files at bottom left print VS ready, now click 'Build' -> 'Build NTLlib' and wait for 'Build: 1 succeeded'. Static library is created in Debug/Release folder.
For using the created library in another project just follow step 6., and set path to the created library folder: Right-Click on project -> 'Properties' -> 'Configuration Properties' -> 'VC++ Directories' -> 'Library Directories'/
Can anyone list the specific and detailed steps to configure mc.exe (the message compiler) to compile a .mc file into a .rc file as a custom compiler step in VC++ 2010?
I am really lost on how to do this.
Hans Passant almost had it right. Unfortunately, $(InputPath) and $(InputName) aren't defined in VS 2010. Instead, create your message file:
Right click on your project->Add->New Item
Select "Text File (.txt), but name it as a ".mc" file (like "messages.mc")
Create a resource file (say, "resources.rc")
Edit the resources file so it contains only one line:
#include "messages.rc"
That file will be generated by the message compiler. Now add a custom build step to run the message compiler:
Right-click on messages.mc and select Properties.
In the Properties dialog set Configuration to "All Configurations".
Under "Configuration Properties" click on "General".
Ensure the "Excluded From Build" property is set to "No".
Set the "Item Type" property to "Custom Build Tool" from the drop-down menu and click the "Apply" button so the "Custom Build Tool" property will appear.
Click on "General" under the "Custom Build Tool" property.
Set the "Command Line" property to:
mc %(FullPath)
Set the Description property to something like "Compiling Messages..."
Set Outputs property to:
%(Filename).rc;%(Filename).h;MSG0409.bin
The file MSG00409.bin is from having the following line in messages.mc:
LanguageNames = (English=0x409:MSG00409)
There can be a bin file for each language you add to messages.mc. The nice part of listing them in the output is that it will be deleted when the project is cleaned.
The only thing I'm not sure about is setting the "Execute Before" property to guarantee messages.rc is generated before resource.rc is compiled. I didn't have to set it, but if you find the resource compiler is trying to execute before the message compiler, then you'll have to set this property. It's disabled for the "messages.mc" file, but it can be set in the project's "Custom Build Step" property.
Right-click the project, Add + New Item, select Text File, name it Blah.mc. Enter or paste the definitions. Right-click Blah.mc, Properties, Custom build step:
Command line = mc $(InputPath)
Outputs = $(InputName).rc
Edit your .rc file, add:
#include "Blah.rc"
Worked for me, ought to be close.
If you want to use a Custom Build Rule, you can do this
Right click your project in Visual Studio -> Custom Build Rules
Click "New Rule File" and fill out the fields, I use this rule file for MC.EXE
<VisualStudioToolFile Name="Message Table Build Rule" Version="8.00">
<Rules>
<CustomBuildRule
Name="Message Table Build Rule"
DisplayName="Message Table Build Rule"
CommandLine="[Location]\mc.exe [Unicode] [Verbose] [Inputs]"
Outputs="Message Table Build Rule"
FileExtensions="*.mc"
ExecutionDescription="Message Table Build Rule"
>
<Properties>
<BooleanProperty
Name="Verbose"
DisplayName="Verbose mode"
Description="Foo."
Switch="-v"
/>
<BooleanProperty
Name="Unicode"
DisplayName="Unicode mode"
Description="Bar."
Switch="-u"
/>
<StringProperty
Name="Location"
DisplayName="Location"
Description="Baz."
Switch="[value]"
DefaultValue="C:\Bin\Psdk\Bin"
/>
</Properties>
</CustomBuildRule>
</Rules>
</VisualStudioToolFile>
In case custom compiler is not a requirement but more how to make it build .rc files from MSBuild.
The WDK MessageCompiler task offers this integration with MSBuild
<ItemGroup>
<MessageCompile Include="a.mc">
<GenerateBaselineResource>true</GenerateBaselineResource>
<BaselineResourcePath>c:\test\</BaselineResourcePath>
</MessageCompile>
</ItemGroup>
In Visual Studio 2017 - then you can do following:
open up the .vcxproj file for your project, then add following lines inside the ItemDefinitionGroup :
<CustomBuildStep>
<Command>mc "$(InputDir)\$(InputName).mc" -r "$(InputDir)\res" -h "$(InputDir)"</Command>
</CustomBuildStep>
This should generate 3 files .h, .rc, and .res - look in the designated build folder