atom-gpp-compiler
atom-gpp-compiler copied to clipboard
Uncaught TypeError: Callback must be a function. Received undefined
[Enter steps to reproduce:]
- ...
- ...
Atom: 1.53.0 x64 Electron: 6.1.12 OS: macOS 11.1 Thrown From: gpp-compiler package 3.0.7
Stack Trace
Uncaught TypeError: Callback must be a function. Received undefined
At fs.js:142
TypeError [ERR_INVALID_CALLBACK] [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
at maybeCallback (fs.js:142:9)
at Object.writeFile (fs.js:1175:14)
at /packages/gpp-compiler/index.js:299:12)
at ChildProcess.emit (events.js:200:13)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
Commands
5x -1:20 core:backspace (input.hidden-input)
2x -1:17.2.0 core:move-right (input.hidden-input)
10x -1:14.9.0 core:backspace (input.hidden-input)
-1:12.2.0 autocomplete-plus:confirm (input.hidden-input)
-1:12.2.0 snippets:expand (atom-text-editor.editor.is-focused.autocomplete-active)
6x -1:11.3.0 core:move-right (input.hidden-input)
-1:04.5.0 core:backspace (input.hidden-input)
3x -1:01.2.0 core:move-left (input.hidden-input)
3x -0:59.4.0 core:move-right (input.hidden-input)
-0:56 core:backspace (input.hidden-input)
2x -0:55 core:move-right (input.hidden-input)
5x -0:54.4.0 core:move-down (input.hidden-input)
7x -0:45.4.0 editor:delete-to-beginning-of-line (input.hidden-input)
9x -0:39.2.0 gpp-compiler:compile (input.hidden-input)
4x -0:17.4.0 core:save (input.hidden-input)
2x -0:16.4.0 gpp-compiler:compile (input.hidden-input)
Non-Core Packages
gpp-compiler 3.0.7
I have the same proble when i tried to run my c program what should i do?
having the problem while compiling the C++ code on Atom ide. How to solve this??
having the problem while compiling the C++ code on Atom ide. How to solve this??
if you do somehow find the solution then please post it here.
i was on windows and updating mingw using cmd helped me out.
Having the same issue too, it was working just fine yesterday
For me the format string is creating the error "Uncaught TypeError: Callback must be a function. Received undefined"
This fails: #include <stdio.h> int main(){ printf("%s", please work); }
And this works: int main(){ printf("please work"); }
having the problem while compiling the C++ code on Atom ide. How to solve this??
I found the solution- there is very silly mistake in my code i.e. I forgot to write semicolon and also mis-spell the cout (this solution is only for my error )if you have the same comment here.
Guys, i just found out the solution for this problem. At least that is what i was doing wrong, i was not saving my file as .c or .cpp for c and c++ language that is required for gpp compiler to process.
try doing this, i think it could solve your issue. this worked in my device.
For me the format string is creating the error "Uncaught TypeError: Callback must be a function. Received undefined"
This fails: #include <stdio.h> int main(){ printf("%s", please work); }
And this works: int main(){ printf("please work"); }
/* you did not declare the string "please work", hence why your program will crush (%s is a place holder for a non declared string.). here is a sample that should work fine.*/
#include <stdio.h> #define SIZE 50 int main(void) { char string[SIZE] = "please work," ; printf("%s \n",string); }