I am compiling a YACC file using Cygwin shell on a PC. I am getting an 'unknown character \15'. The weird thing is that a co-worker on another machine can compile the exact same file using the same shell with no warnings or errors. Is there some kind of flag I need to set in my shell or with the compiler? We are using nmake and a Visual Studio compiler. I will be happy to provide more info if needed.
Thank you very much!
Check your end-of-line settings. You probably have CRLF and YACC expects LF only. CR is ASCII 13 (15 in octal).
When you install cygwin you get asked about what the default EOL (end of line) should be, traditional unix "\n" or traditional dos "\r\n". My guess is that you and your co-worker have cygwin configured differently. You probably want to run your setup.exe again and select dos EOL.
Octal 15 is a carriage return. Did you transfer the file in text mode from your coworker's machine?
Related
i have an ender 3 pro 3d printer, due to hardware upgrades I have needed to change the firmware, unfortunately this hasn't been hassle free, I have got the firmware files from github.com in the marlin section, marlin being the firmware that the 3d printer uses, I have edited the files using VSCode, I have the latest python downloaded which apparently is needed for compiling the firmware, and I downloaded the extension platform IO, but when I try to run the command build it throws me an error code, I have watched tutorials on how to do this and have literally followed them step by step, so I'm not sure whats going on, I don't know if it could potentially be a firewall or something to that effect but honestly I have very little idea,
the error code it throws out is
msbuild : The term 'msbuild' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:1
msbuild /property:GenerateFullPaths=true /t:build /consoleloggerparam ...
+ CategoryInfo : ObjectNotFound: (msbuild:String) [], CommandNotF
oundException
+ FullyQualifiedErrorId : CommandNotFoundException
i understand that it is saying that the term MSbuild is undefined but i've done everything on the tutorials have said, is there something obvious i'm missing?
try checking your system PATH variables. You need to add it to this collection, or you need to open terminal where your executable is and run it from there. Also check for case sensitivity in your command.
The right way of running msbuild is with the dotnet prefix as it is a part of .Net and .Net core
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-msbuild
Have you considered giving the “Auto Build Marlin” extension a try?
https://marlinfw.org/docs/basics/auto_build_marlin.html
It should install all needed dependencies and configure the settings.
I don't think I ever had to use msbuild or python to compile Marlin inside VScode. Is it possible that you are trying to build the wrong part of the MarlinFW or the PlatformIO installation had gone wrong (restart?).
Most of the time the only hard part with PlatformIO is configuring the platformio.ini file correctly. Can you share yours?
Additional information about Marlin and PlatformIO under https://marlinfw.org/docs/basics/install_platformio_vscode.html
I am trying to use Visual Studio for my .cpp programs and Terminator to simulate in Ubuntu. I have a little knowledge of CmakeLists.txt but never used it before. I want to simulate the 3D point cloud in terminator but I'm stuck. How to set PCL_DIR and give it full path? The file is stored in -
home/shruti/Documents/LIDAR-SNFD-Detection-master/CMakeLists.txt.
Earlier I was getting this error -
CMakeLists Directory Changed
Getting CmakeLists.txt Error
I'm new to Ubuntu and importing CMake files in Terminator. It would be good if I get some references on how to proceed. Thank you :)
I have relatively complex cmake files and I am wondering if there is any utility that can reformat a cmakeList.txt and beautify it for easier reading?
Some simple tricks would do the jobs, such as indenting if else endif sections and so on.
Is there any such tools?
I am using notepad++ for editing, but if there is any other tools, I can switch.
Someone recently wrote a CMake autoformatter called cmake_format. Still under development but should be good enough for basic CMake files.
I searched for a code beautifier supporting CMake, and I did not find any.
There is this thread on CMake mailing lists, which does not provide a good solution
This mailing list thread provides no answer too (some use emacs mode)
I checked most of the major code beautifiers using UniversalIndentGUI on Ubuntu. None of the provided beautifiers from the long list are working with CMake out of the box.
Looks like implementing CMake support in an existing beautifier, or writing a custom one is a great idea for a nice code project.
Take a look at Atom and its plugin language-cmake (you can install easily with Atom package manager).
Once both are installed, open your CMakeLists.txt and go to Edit > Lines > Auto Indent.
In case it is not clear from the other answers and comments.
In Ubuntu (Debian?) there is a tool called cmake-format, which seems to be what is called cmake_format in other answers.
And it worked very well for me.
$ apt search cmake-format
Sorting... Done
Full Text Search... Done
cmake-format/kinetic,kinetic,now 0.6.13-2 all [installed]
source code formatter for cmake listfiles
$ cmake-format --help
usage:
cmake-format [-h]
[--dump-config {yaml,json,python} | -i | -o OUTFILE_PATH]
[-c CONFIG_FILE]
infilepath [infilepath ...]
Parse cmake listfiles and format them nicely.
...
The specification file is quite difficult to understand but I liked the default formatting anyway.
The best part is that it seems to normalize the capitalization of keywords which is what drives me crazy.
I have looked at build result for a simple hello world console app to see command line for compilation. Why is it so complex ? How can I then automate things if it is such complex ?
If you intend to automate builds of Xcode projects, use xcodebuild(1).
Your xcodeproj file contains all of the settings that you would need to specify on the command line if you were to call gcc directly. If you run xcodebuild all you need to do is specify your xcodeproj file, the target, the configuration, and the SDK to use. Everything else is done automatically.
Run "man xcodebuild" for more information.
XCode specifies an immense number of command line options for the compiler and linker with fully qualified path names. When working at the command line you'll frequently use defaults instead of specifying all the options the IDE does. Make or some other build tool is your friend for automation.
I have a Matlab script that requires a function in a DLL, and calls addpath to put it's location on the path. This works fine, but when I try to invoke the same script on the command line with matlab -r "scriptname" it errors out saying that method is undefined. Is there something different happening when I'm starting from the command line vs loading up the GUI normally?
turns out both 64-bit and 32-bit versions of matlab were installed, and the first one in the path was the 64-bit, whereas I needed the 32-bit for things to work.