linter-gcc
linter-gcc copied to clipboard
Uncaught TypeError: Cannot read property 'binary' of undefined
[Enter steps to reproduce below:]
- ...
- ...
Atom Version: 1.5.3 System: ALI-PC Thrown From: linter-gcc package, v0.6.5
Stack Trace
Uncaught TypeError: Cannot read property 'binary' of undefined
At C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\src\pane.js:825
TypeError: Cannot read property 'binary' of undefined
at Object.lint (C:/Users/Ali/.atom/packages/linter-gcc/lib/main.js:61:32)
at lintOnSave (C:/Users/Ali/.atom/packages/linter-gcc/lib/main.js:107:22)
at Function.module.exports.Emitter.simpleDispatch (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
at TextBuffer.module.exports.TextBuffer.saveAs (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:1067:27)
at TextBuffer.module.exports.TextBuffer.save (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:1037:19)
at TextEditor.module.exports.TextEditor.save (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\src\text-editor.js:630:26)
at Pane.module.exports.Pane.saveItem (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\src\pane.js:545:18)
at Pane.module.exports.Pane.saveActiveItem (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\src\pane.js:528:19)
at Workspace.module.exports.Workspace.saveActivePaneItem (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\src\workspace.js:649:35)
at atom-workspace.commandRegistry.add.core:save (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\src\register-default-commands.js:173:32)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\src\command-registry.js:260:29)
at C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\src\command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:536:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:359:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\src\window-event-handler.js:97:36)
at HTMLDocument.<anonymous> (C:\Users\Ali\AppData\Local\atom\app-1.5.3\resources\app.asar\src\window-event-handler.js:3:61)
Commands
-9:54.9.0 core:save (div.package-detail.panels-item)
-9:34.5.0 editor:newline (atom-text-editor.editor.is-focused)
-9:31.1.0 core:save (atom-text-editor.editor.is-focused)
-8:58.7.0 core:backspace (atom-text-editor.editor.is-focused)
2x -8:57.7.0 core:save (atom-text-editor.editor.is-focused)
Config
{
"core": {
"disabledPackages": [
"minimap"
],
"themes": [
"atom-dark-ui",
"one-dark-syntax"
]
},
"linter-gcc": {
"execPath": "MinGW/bin/gcc"
}
}
Installed Packages
# User
atom-html-preview, v0.1.13
autoclose-html, v0.20.0
autocomplete-html-entities, v0.1.0
autocomplete-python, v1.6.1
color-picker, v2.1.1
linter, v1.11.3
linter-gcc, v0.6.5
terminal-plus, v0.14.5
# Dev
No dev packages
Can someone help me I installed Atom new and i dont know what i did wrong.
Hey, i just installed platformIO atom IDE and just got the same problem, Would be happy if you would share solution if you found one :)
The issue here was probably that gcc wasn't installed. Please read the wiki and follow the steps there.
Hello. Is it working for you now?
Im trying a reinstall right now, im on windows and having a few problems. My goal is first to compile and run c++ files and second is to get linter to work.
The wiki says something about gcc version 6.0, seems i have an much older version, 2.91.57. Does cygwin install the latest?
Im using the gpp-compiler package to compile my c++ files but i get an error that "start" could not be spawned and be added to path but i have no clue what "start" is, g++ is in the path and working, i get a compiled file.
Thanks for the help!
On Wed, Feb 24, 2016 at 12:34 PM, Husam Hebaishi [email protected] wrote:
Hello. Is it working for you now?
— Reply to this email directly or view it on GitHub https://github.com/hebaishi/linter-gcc/issues/29#issuecomment-188211180.
You mis-read the wiki. The wiki says that versions 0.6.0 -> 0.6.5 of linter-gcc are missing a feature (the automatic installation of the base linter package), but I assume you have installed the latest version of linter-gcc which means you shouldn't have this problem. What you need to do is setup g++ on cygwin so that g++ is in your $PATH so that the command g++ --version works in the terminal.
Please see this guide on how to install gcc/g++ on Cygwin.
I've gotten that to work, g++ is in the path and i can use g++ in cmd
Ok. Now all your need to do is specify g++ as your executable path in the linter-gcc configuration settings and it should just work.
Do i do that in the config.js file for linter-gcc? I Couldn't find anything about specifying path in the settings.
No. In atom, you click Packages > Settings View > Open. Then click Packages on the left hand panel, and type linter-gcc into the filter box. Click Settings it to get to the configuration settings.
It seems you are unfamiliar with atom. I suggest you read the Atom Flight Manual here to get more familiar with the interface.
Yes, i first found out about it a few days ago, thanks alot! :+1:
Is linter-gcc working for you?
No i get the error,
"linter-gcc: Executable not found" "C:\MinGW\bin" not found
and
Uncaught TypeError: Cannot read property 'binary' of undefined /C:/Users/Andreas/.atom/packages/linter-gcc/lib/main.js:72
The binary you have entered is still incorrect. You need to enter g++ into the linter-gcc configuration settings page (in the GCC Executable Path), NOT C:\MinGW\bin. The full path (I'm assuming it's C:\MinGW\bin\g++) will not work because g++ needs to know where to find its header files. It has to be in your path for this whole thing to work.
Ah thank you, now i no longer get the error! But seems i forgot to install clang... Thanks alot for helping me and explaining in a way i understand :)
Clang is a different compiler from g++. Does linting C/C++ code work for you now?
Yeah it works now!
@hebaishi Hello, I tried: C:\MinGW\bin\g++, but it still not work.
I'm also having this problem. I tried C:\MinGW\bin\g++.exe and the error goes away but it doesn't do any "Lint"ing
thanks for the guidence! I’ve fixed it.
Sometimes this error occurs when storing/using/writing the same project from different OS-platforms to the same folder (e.g. on cloud ...)
Uncaught TypeError: Cannot read property 'binary' of undefined
At /usr/share/atom/resources/app.asar/src/pane.js:1002
TypeError: Cannot read property 'binary' of undefined
If this is your issue, you need to re-init your project from the 'platformio' menu.
Sir, can you make a tutorial out to fix this error & post it in youtube ?
To whom was this replay/question directed?
To me, I believe. I'm writing a guide for windows users now.
Anyone who is willing to help.A tutorial from installing ,integrating gcc & compiling+running a c++ program will be very helpful.
Sir, I am stuck up here - https://www.quora.com/How-do-I-integrate-GCC-with-Atom-to-compile-C++-code
Also I went to package>settings & under GCC path - gave g++ but nuthing works.Help from here is welcome.I am a beginner, so I might have made mistakes.please look in the description of quora.
You have done the right thing and added g++ to your PATH. You just need to set your linter-gcc executable path to g++.exe and it should work.
Sir, I dont understand.What does the error means ?
You are using the wrong header files. conio.h is a C header, and in C++ to use cin and cout, you #include <iostream>.
Your code looks like C++ code, so delete the conio include, and change the iostream include to #include <iostream>.
Please read this article on header files.