I'm trying to build a lexical analyzer (tokenizer) by flex on microsoft visual studio 2010, but it doesn't make the C-file (lex.yy.c) when I press Tools -> flex
can any body help me?
Flex does not normally come as part of visual studio, so it must have been downloaded and added.
The instructions for the addition of flex and bison with visual studio are here: http://sourceforge.net/p/winflexbison/wiki/Visual%20Studio%20custom%20build%20rules/
Have your read that documentation. It shows you how to get it working.
Many people find it easier to just use flex and bison in command prompt mode.
Related
I am using ROS and C++ and ROS packages have a CMakeLists.txt in them. I would like to have a syntax highlighting for CMakeLists.txt in visual studio code.
Unfortunately, I searched on the internet but I can't find how to do this.
Could you help me?
Below is how to do it. It is quite straightforward (with an extension):
Open Visual Studio Code
CTRL+P - Launch VS Code Quick Open
ext install twxs.cmake - Install the extension "CMake For VisualStudio Code"
I hope this will help someone else.
p.s. It is always like that. I search for a long time, I don't find an answer. Then I post the question here and I immediately find the answer.
most easiest is to install cmake and CMake Language Support extensions. makes your life easier. you could search them and install in extension panel in vs code.
Visual Studio was added a lot of support for Clang.
I want to use clang-tidy.exe for a Visual-Studio project. In order to do that I need the JSON "compilation database".
Is there some way to export this database from a visual studio (2015) project?
To export the JSON compilation Database you can use the Clang Power Tools VS extension.
All you need to do is to select your VS project from Solution Explorer, open the context menu by pressing right-click on it, and then search for Clang Power Tools. In the submenu search for the Export Compilation Database option. The JSON compilation database will be automatically generated for you.
More details about this feature can be found in this article.
The extension is compatible with Visual Studio 2015, 2017 and 2019.
I've bumped into your question whilst searching for an answer to this very problem. This is what I have found so far:
SourceTrail provides a Visual Studio extension which is able to create a compilation database. See also this discussion. I have no experience with the extension, but it seems to tackle this problem.
compdb is a python script with all sorts of utilities for compilation databases. AFAIK it does not yet support visual studio, but it would be a great place to add support for this functionality.
HTH.
I have installed the VSProlog extension in my Visual Studio 2015, from here: https://visualstudiogallery.msdn.microsoft.com/50f0f293-bcb5-4f95-a9d0-afff92306973
Going to Tools>Extensions and updates I can see the extension installed, and it's enabled. Everything seems fine.
But trying to create a simple prolog .pl or .ari file, in File>New project... I can create C#, Visual Basic files, ASP, Python... but nothing appears related to Prolog.
How can I create a Prolog File in my Visual Studio?
Disclaimer: I'm the developer of the extension.
As stated before, VSProlog is not a template extension. It just enables syntax coloring for prolog files defined as *.ari and *.pl.
Opening a .pl file with Visual Studio and the extension installed (of course) should be enough.
Feel free to file an issue at GitHub
i'm searching for a way to change the language of the "Spell Checker"-Extension for Visual Studio 2010.
The problem is following:
I'm using the german language version of Visual Studio 2010. If I use the "Spell Checker"-Extension it checks the correctness in german language, while I'm coding in english.
So nearly every single word is underlinded as incorrect.
How can I change the checking language to english or how can I change the libary it used to check language?
Any Ideas?
I found a solution for the problem by myself.
If anybody like to know it:
First download the extension inside the Visual Studio extension-manager.
Second download the source of the extension and open it in Visual Studio (Visual Studio SDK has to be installed to open the project)
Third navigate to Spellchecker/Spelling/SpellingTaggers.cs and add the following line inside the CheckSpellings method of SpellingTaggers class under the textBox initialization:
textBox.Language = XmlLanguage.GetLanguage("en-US");
Next build the dll-Files with Visual Studio
And finally replace the dll-files with those in the directory of the Spell Checker Extension (it can be found under %HOME%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Roman Golovin, Michael Lehenbauer, Noah Richards\Spell Checker\2.23 or something similar)
That's it!
If you want to use a language different from "en-US", change the Language Code.
There is a fork of spellchecker, that maybe will eventually be integrated into the main branch, that supports spellchecking in multiple languages here:
https://github.com/simonegli8/Spellchecker
Simon Egli
Remark:
Step 5 will not work in all cases. I think dlls are cached or something like this, so it would be better to uninstall spell checker from Visual Studio and reinstall the new compiled version of SpellChecker.vsix (could be found in SpellChecker.Implementation\bin...).
This worked for me.
I was wondering if anyone knows how to use a new compiler within visual studio, and how the interface between compiler and IDE works to make error messages and source code locations "work" (eg double click goes to location).
Context: trying to integrate clang
I am using NMake for "integrating" clang with Visual Studio. You get the convenience of syntax highlighting and intellisense with the power of LLVM. You have to manually make an nmake buildscript file though (which is quite cumbersome).
There is a clang switch called -fdiagnostics-format=msvc that will output the error and warnings in a format that Visual Studio understands (so you can quickly jump to errors or warnings in your code).
Microsoft provides a Visal Studio Integration SDK which presumably is used by Intel. The Intel compilers can add themselves to the VS IDE and replace the Microsoft compilers.