brhaka / sfml-compiler Goto Github PK
View Code? Open in Web Editor NEWAtom SFML Compiler
Home Page: https://atom.io/packages/sfml-compiler
License: MIT License
Atom SFML Compiler
Home Page: https://atom.io/packages/sfml-compiler
License: MIT License
[Enter steps to reproduce:]
Atom: 1.53.0 x64
Electron: 6.1.12
OS: Microsoft Windows 10 Home
Thrown From: sfml-compiler package 1.3.4
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 Object.compile (/packages/sfml-compiler/lib/sfml-compiler.js:168:7)
at /packages/sfml-compiler/lib/sfml-compiler.js:90:20)
at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:350265)
at CommandRegistry.dispatch (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:11:348740)
at AtomEnvironment.dispatchApplicationMenuCommand (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:1:767067)
at EventEmitter.t (~/AppData/Local/atom/app-1.53.0/resources/app/static/<embedded>:1:774990)
at EventEmitter.emit (events.js:200:13)
at Object.onMessage (~/AppData/Local/atom/app-1.53.0/resources/electron.asar/renderer/init.js:42:16)
-0:23.7.0 sfml-compiler:compile (input.hidden-input)
cpp-compiler 1.3.0
file-icons 2.1.45
gpp-compiler 3.0.7
sfml-compiler 1.3.4
Atom: 1.41.0-nightly1 x64
Electron: 4.2.7
OS: DESKTOP-0N5MG0H
Thrown From: sfml-compiler package 1.3.2
Uncaught Callback must be a function
At fs.js:129
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:129:9)
at Object.writeFile (fs.js:1137:14)
at Object.toggle (/packages/sfml-compiler/lib/sfml-compiler.js:161:7)
at /packages/sfml-compiler/lib/sfml-compiler.js:90:20)
at CommandRegistry.handleCommandEvent (~/AppData/Local/atom-nightly/app-1.41.0-nightly1/resources/app/static/<embedded>:11:349102)
at KeymapManager.dispatchCommandEvent (~/AppData/Local/atom-nightly/app-1.41.0-nightly1/resources/app/static/<embedded>:11:1249829)
at KeymapManager.handleKeyboardEvent (~/AppData/Local/atom-nightly/app-1.41.0-nightly1/resources/app/static/<embedded>:11:1245963)
at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom-nightly/app-1.41.0-nightly1/resources/app/static/<embedded>:11:284308)
-8:14.6.0 core:save (input.hidden-input)
-8:13.5.0 gpp-compiler:compile (input.hidden-input)
2x -7:34.9.0 core:select-all (input.hidden-input)
-6:02.6.0 core:paste (input.hidden-input)
-5:48.4.0 core:save (div.package-detail)
-5:12.2.0 sfml-compiler:toggle (input.hidden-input)
-4:41.5.0 core:select-all (input.hidden-input)
-4:41.2.0 core:backspace (input.hidden-input)
-4:38.1.0 core:save (input.hidden-input)
-4:34.6.0 gpp-compiler:compile (input.hidden-input)
-4:30.8.0 gpp-compiler:gdb (input.hidden-input)
-4:16.1.0 sfml-compiler:toggle (input.hidden-input)
-1:12.3.0 core:copy (input.hidden-input)
-1:11.4.0 core:paste (input.hidden-input)
-0:48.5.0 core:save (div.package-detail)
-0:43.8.0 sfml-compiler:toggle (input.hidden-input)
gpp-compiler 3.0.7
intellij-idea-keymap 0.2.3
sfml-compiler 1.3.2
I have a problem. After f9 I see this. "Can't find main.exe . Check if the name is correct and try again." (this error was translated because I have it in another language, but the essence is clear). I tried to run a default program from an sfml's site.
What am I doing wrong?
#include <SFML/Graphics.hpp>
#include
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML not suka works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
After I hit F9, it creates the build folder, but it is empty. I read the error log, and it said:
C:\Users--\Desktop\stuff\cpp\main.cpp: In function 'int main()':
C:\Users--\Desktop\stuff\cpp\main.cpp:2:5: error: 'sf' has not been declared
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
^~
C:\Users--\Desktop\stuff\cpp\main.cpp:3:5: error: 'sf' has not been declared
sf::CircleShape shape(100.f);
^~
C:\Users--\Desktop\stuff\cpp\main.cpp:4:5: error: 'shape' was not declared in this scope
shape.setFillColor(sf::Color::Green);
^~~~~
C:\Users--\Desktop\stuff\cpp\main.cpp:4:24: error: 'sf' has not been declared
shape.setFillColor(sf::Color::Green);
^~
C:\Users--\Desktop\stuff\cpp\main.cpp:6:12: error: 'window' was not declared in this scope
while (window.isOpen())
^~~~~~
C:\Users--\Desktop\stuff\cpp\main.cpp:8:9: error: 'sf' has not been declared
sf::Event event;
^~
C:\Users--\Desktop\stuff\cpp\main.cpp:9:33: error: 'event' was not declared in this scope
while (window.pollEvent(event))
^~~~~
C:\Users--\Desktop\stuff\cpp\main.cpp:11:31: error: 'sf' has not been declared
if (event.type == sf::Event::Closed)
^~
Here are my settings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.