Coder Social home page Coder Social logo

atom-gpp-compiler's Introduction

gpp-compiler

This Atom package allows you to compile and run C++ and C within the editor.

To compile C or C++, press F5 or right click the file in tree view and click Compile and Run.

To compile C or C++ and attach the GNU Debugger, press F6 or right click the file in tree view and click Compile and Debug.

Dependencies

This package relies on a C / C++ compiler (gcc).

Linux

The GNU Compiler Collection may come with your distribution. Run which gcc g++ to find out.

If that command does not output

/usr/bin/gcc
/usr/bin/g++

you will need to install it.

For RHEL-based distros, run sudo dnf install gcc gcc-c++.

For Debian-based distros, run sudo apt install gcc g++.

For Arch-based distros, run sudo pacman -S gcc.

Windows

You'll need to install MinGW and add it to your PATH.

Mac

You'll need to install XCode.

Contributing

# to start, you must fork this project
git clone https://github.com/<your username>/atom-gpp-compiler.git
cd atom-gpp-compiler
rm -rf ~/.atom/packages/gpp-compiler
npm install # this will install developer dependencies (eslint)
apm link # this will create a symbolic link from this directory to ~/.atom/packages
git checkout -b my-changes # this will create a new branch, change `my-changes` to something else
# make your changes
npm test # this will eslint `index.js`, if this gives you any errors, fix them
# test your changes in Atom, because you ran `apm link`, this package will automatically load
git add .
git commit -m "added a feature"
git push
# go to https://github.com/<your username>/atom-gpp-compiler.git and click `Create Pull Request`

atom-gpp-compiler's People

Contributors

farnabaz avatar kriscross07 avatar linuxmercedes avatar sylxjtu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-gpp-compiler's Issues

Gnome Terminal opens in Background

If I launch the program with the Gnome Terminal setting, the Terminal is opened in the background. I'd prefer for the terminal to pop up infront of Atom, like the Xterm terminal does.
I'm on Ubuntu 16.10 running the latest version of Atom and this package.

Not compiling.

Dunno what you were trying to do but, {esc(["g++", info.base, "-o", info.name]) + ...} creates ('g++' 'something.cpp' '-o' 'something.exe' ...) instead of (g++ something.cpp -o something.exe ...) i'll advise to modify it to just {"g++ " + info.base + " -o " + info.name + ...} so that this will be avoided, because i don't know how on the other OSs but on windows it is now broken.

uniform variable assignment error

Hi.

I'm currently having a problem assigning variables. Below is my example code but whenever I run it, atom always displays an error message saying that there's "an expected ; at the end of" the line assigning the variable. Is there any way I can fix that?

=========================================================================

include

using namespace std;

int main()
{
int i{ 2 };
}

=========================================================================

Also, whenever I get an error compiling in c++ with atom, the error popup in atom is very short in its duration. Is there any way to extend it and allow to appear there indefinitely?

Thanks for your help.

show the compile info?

show in seprate cmd window?
like run step?

then we don't need compiling_error.txt option.

Issue

'g++' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.

I have g++ installed and on my path, however the package won't compile a simple output project.

C:\Users\Sean>\mingw\bin\gcc --version
gcc (GCC) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C:\Users\Sean>\mingw\bin\g++ --version
g++ (GCC) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The compiled file fails to execute filestream operations

I am using atom v1.7.3, g++ v5.2.1.

My Problem is that when I compile and run the program given below, It does not work:

#include <iostream>
#include <fstream>

using namespace std;

int main() {
    ofstream file("myFile.txt"); // I do already have tried with and without this file in the folder

    file << "Amazing";

    file.close();

    return 0;
}

Where as when I use

$ g++ file-handling.cpp
$ ./a.out

It works perfectly.

I run Ubuntu mate 15.10.

[Solved]Uncaught TypeError: Bad argument

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.8.0
System: Microsoft Windows 10 Pro Insider Preview
Thrown From: gpp-compiler package, v3.0.2

Stack Trace

Uncaught TypeError: Bad argument

At internal/child_process.js:274

TypeError: Bad argument
    at TypeError (native)
    at ChildProcess.spawn (internal/child_process.js:274:26)
    at Object.exports.spawn (child_process.js:374:9)
    at compile (C:\Users\IronJaeger\.atom\packages\gpp-compiler\index.js:204:31)
    at tree-view-file.treeCompile (C:\Users\IronJaeger\.atom\packages\gpp-compiler\index.js:186:3)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\IronJaeger\AppData\Local\atom\app-1.8.0\resources\app.asar\src\command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (C:\Users\IronJaeger\AppData\Local\atom\app-1.8.0\resources\app.asar\src\command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\IronJaeger\AppData\Local\atom\app-1.8.0\resources\app.asar\src\command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (C:\Users\IronJaeger\AppData\Local\atom\app-1.8.0\resources\app.asar\src\atom-environment.js:1106:28)
    at EventEmitter.outerCallback (C:\Users\IronJaeger\AppData\Local\atom\app-1.8.0\resources\app.asar\src\application-delegate.js:340:25)
    at emitThree (events.js:97:13)
    at EventEmitter.emit (events.js:175:7)

Commands

     -6:51.6.0 core:move-right (atom-text-editor.editor.is-focused)
     -6:50.9.0 editor:newline (atom-text-editor.editor.is-focused)
  2x -6:47.1.0 core:backspace (atom-text-editor.editor.is-focused)
     -6:25.9.0 core:undo (atom-text-editor.editor.is-focused)
  2x -6:23.8.0 editor:newline (atom-text-editor.editor.is-focused)
     -5:28.8.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:57.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:53.9.0 core:copy (atom-text-editor.editor.is-focused)
     -0:47.3.0 core:save (atom-text-editor.editor.is-focused)
     -0:20.7.0 tree-view:reveal-active-file (li.texteditor.tab.sortable.active.right-clicked)
     -0:08.6.0 gpp-compiler:tree-compile (span.name.icon.icon-file-text)

Config

{}

Installed Packages

# User
gpp-compiler, v3.0.2

# Dev
No dev packages

window, using STL problem

inlucding STL header file is OK,

But when I use actually in code.
program print nothing.

// vector::push_back
#include <iostream>
#include <vector>

int main ()
{

	std::cout << "Hello World!\n";

  std::vector<int> myvector;
  int myint;

  std::cout << "Please enter some integers (enter 0 to end):\n";

  do {
    std::cin >> myint;
    myvector.push_back (myint);
  } while (myint);

  std::cout << "myvector stores " << int(myvector.size()) << " numbers.\n";

  return 0;
}

it never dowload

hi, im bruno from chile, my english is not very well, but it doesnt matter jajaj, so, my problem is, the install of packages never start, mmh better say, it start but never keep going foward. So it was my problem jajaja , i expect an answer. thank you, and sorry if my english is not very well or is too hard understand me, have a nice day jajaj <3

'g++' could not be spawned.

My c++ file is not getting compiled due to this. I checked the previous query in which you asked him to write g++ --version in cmd. I did the same and it returned me the version no. of it. Yet this file is not getting compiled in my system.
Thank you

Linking Libraries

I am currently working on a C++ project, that uses both the GL, GLEW, and SDL2 libraries. How can I link these to this compiler?

Atom is my favourite editor, and I'd rather not have to use Code Blocks long-term.

Thanks!

GNOME terminal annoying blue bar

I get an annoying blue bar on top of my terminal that says:

The child process exited normally with status 0.

How to remove this, it prevents me from seeing the first two lines of the output

Uncaught Error: Can't save buffer with no file path

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.3.0-beta6
System: Mac OS X 10.11.1
Thrown From: gpp-compiler package, v0.3.6

Stack Trace

Uncaught Error: Can't save buffer with no file path

At /Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1036

Error: Can't save buffer with no file path
    at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1036:15)
    at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1030:19)
    at TextEditor.module.exports.TextEditor.save (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/text-editor.js:588:26)
    at atom-text-editor.compile (/Users/molin/.atom/packages/gpp-compiler/index.js:20:20)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:533:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:356:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/window-event-handler.js:99:36)
    at HTMLDocument.<anonymous> (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

  2x -1:02.1.0 gpp-compiler:compile (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "one-dark-syntax"
    ]
  }
}

Installed Packages

# User
gpp-compiler, v0.3.6
language-cpp14, v0.4.2

# Dev
No dev packages

Error on Mac. What to do?

Atom Version: 1.5.3
System: Mac OS X 10.11.4
Thrown From: gpp-compiler package, v2.0.0

Stack Trace

Uncaught TypeError: Incorrect value of args option

At child_process.js:312

TypeError: Incorrect value of args option
    at normalizeSpawnArguments (child_process.js:312:11)
    at Object.exports.spawn (child_process.js:345:38)
    at ChildProcess.<anonymous> (/Users/Siddhant/.atom/packages/gpp-compiler/index.js:86:20)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:817:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

Commands

     -3:59 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-atom-material-ui)
     -3:02.5.0 gpp-compiler:treeCompile (li.file.entry.list-item.status-modified.selected)
  7x -2:25.5.0 core:backspace (atom-text-editor#gpp-compiler.gppOptions.editor.mini.is-focused)
     -2:22.7.0 core:confirm (atom-text-editor#gpp-compiler.gppOptions.editor.mini.is-focused)
  5x -2:16.3.0 core:backspace (atom-text-editor#gpp-compiler.gppOptions.editor.mini.is-focused)
     -2:09.6.0 gpp-compiler:treeCompile (li.file.entry.list-item.status-modified.selected)
  2x -2:05.9.0 core:close (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
  5x -1:54.2.0 core:backspace (atom-text-editor#gpp-compiler.gppOptions.editor.mini.is-focused)
     -1:41.3.0 gpp-compiler:treeCompile (span.name.icon.icon-file-text)
     -1:34.9.0 core:close (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -1:29.5.0 core:select-all (atom-text-editor#gpp-compiler.fileExtension.editor.mini.is-focused)
     -1:29 core:backspace (atom-text-editor#gpp-compiler.fileExtension.editor.mini.is-focused)
     -1:28.3.0 core:confirm (atom-text-editor#gpp-compiler.fileExtension.editor.mini.is-focused)
     -1:24.6.0 core:close (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
  4x -1:17 tree-view:remove (span.name.icon.icon-file-text)
     -0:01.6.0 gpp-compiler:treeCompile (li.file.entry.list-item.status-modified.selected)

Config

{
  "core": {
    "disabledPackages": [
      "linter-oclitnt"
    ],
    "themes": [
      "atom-material-ui",
      "one-dark-syntax"
    ]
  },
  "gpp-compiler": {}
}

Installed Packages

# User
atom-material-ui, v0.8.1
atom-webbrowser, v2.1.4
auto-indent, v0.5.0
autocomplete-clang, v0.8.9
browser-plus, v0.0.54
file-icons, v1.6.14
gpp-compiler, v2.0.0
linter, v1.11.3
linter-clang, v3.4.4
navigate, v0.1.13
pdf-view, v0.39.0
terminal-plus, v0.14.5

# Dev
No dev packages

internal/child_process.js:278

screenshot 19
screenshot 20

screenshot 19
screenshot 20

TypeError: Bad argument
at TypeError (native)
at ChildProcess.spawn (internal/child_process.js:278:26)
at Object.exports.spawn (child_process.js:379:9)
at compile (C:\Users\Neil.atom\packages\gpp-compiler\index.js:274:31)
at tree-view-file.treeCompile (C:\Users\Neil.atom\packages\gpp-compiler\index.js:251:3)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Program Files (x86)\atom-windows\Atom\resources\app.asar\src\command-registry.js:260:29)
at CommandRegistry.handleCommandEvent (C:\Program Files (x86)\atom-windows\Atom\resources\app.asar\src\command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Program Files (x86)\atom-windows\Atom\resources\app.asar\src\command-registry.js:160:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (C:\Program Files (x86)\atom-windows\Atom\resources\app.asar\src\atom-environment.js:1115:28)
at EventEmitter.outerCallback (C:\Program Files (x86)\atom-windows\Atom\resources\app.asar\src\application-delegate.js:342:25)
at emitThree (events.js:110:13)
at EventEmitter.emit (events.js:188:7)

Multiple Errors (Fixed)

I may be doing this wrong, but I have done everything you recommended. I have installed MinGW from the site, and put D:\MinGW\bin\ in the path by doing the following:

My PC >> Properties >> Advanced System Settings >> Environment Variables >> Edit Path in system variables

I started Atom using the command prompt, and when I ran the standard "Hello World" code, I was shown the following screen:
image

Is there a way to fix these errors?

Uncaught TypeError: Cannot read property 'path' of null

my platform is windows. GCC and G++ command is usable in cmd.
C:\Users\SNY.atom\packages\gpp-compiler\index.js:125
Hide Stack Trace
TypeError: Cannot read property 'path' of null
at atom-text-editor.compileGpp (C:\Users\SNY.atom\packages\gpp-compiler\index.js:125:62)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\SNY\AppData\Local\atom\app-1.7.2\resources\app.asar\src\command-registry.js:260:29)
at C:\Users\SNY\AppData\Local\atom\app-1.7.2\resources\app.asar\src\command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\SNY\AppData\Local\atom\app-1.7.2\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:580:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\SNY\AppData\Local\atom\app-1.7.2\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:388:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (C:\Users\SNY\AppData\Local\atom\app-1.7.2\resources\app.asar\src\window-event-handler.js:98:36)
at HTMLDocument. (C:\Users\SNY\AppData\Local\atom\app-1.7.2\resources\app.asar\src\window-event-handler.js:3:61)

" 'start' could not be spawned. "

Getting this error when trying to compile:

`'start' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.``

Though it does compile and create an executable, it doesn't run it. I have to manually open it.

Add Mate-Terminal support.

Please add the support for mate-terminal.
A lot of people might be using Ubuntu Mate (including me).

I think functionality wise it won't be difficult to implement as Mate-Terminal is based on / fork of Gnome-Terminal.

Compiler error when compiling multiple files

Hi,
I wrote "*.cpp -o File" into the settings so that when I compile, it will compile all the files in the directory, but instead it throws an error saying this:
C:\Users\JUANAN1\AppData\Local\Temp\ccGEf6iK.o:C++_Test1.cpp:(.text+0x0): multiple definition of BasicMathFunction()' C:\Users\JUANAN~1\AppData\Local\Temp\cc7bT1s7.o:C++_Test1.cpp:(.text+0x0): first defined here C:\Users\JUANAN~1\AppData\Local\Temp\ccGEf6iK.o:C++_Test1.cpp:(.text+0x10b): multiple definition ofDuplicateNumber(int)'
C:\Users\JUANAN
1\AppData\Local\Temp\cc7bT1s7.o:C++_Test1.cpp:(.text+0x10b): first defined here
C:\Users\JUANAN1\AppData\Local\Temp\ccGEf6iK.o:C++_Test1.cpp:(.text+0x125): multiple definition of `main'
C:\Users\JUANAN
1\AppData\Local\Temp\cc7bT1s7.o:C++_Test1.cpp:(.text+0x125): first defined here
collect2.exe: error: ld returned 1 exit status

Is there another way to compile multiple files or a way to fix this error?
Thanks.

[Windows] 'g++' could not be spawned

I have installed g++ via mingw and have C:\MinGW\bin in my PATH, but atom cannot spawn g++. The error said to open an issue, so here it is!

Directory listing showing g++ is there:

>dir c:\MinGW\bin\g++.exe
 Volume in drive C is OS
 Volume Serial Number is 4EAF-EDC5

 Directory of c:\MinGW\bin

07/25/2015  06:32 AM           903,694 g++.exe

PATH showing C:\MinGW\bin is in PATH:

>echo %PATH%
C:\ProgramData\Oracle\Java\javapath;C:\PROGRAM FILES\DELL\DW WLAN CARD\DRIVER;C:\PROGRAM FILES (X86)\NVIDIA CORPORATION\PHYSX\COMMON;C:\PROGRAM FILES (X86)\INTEL\ICLS CLIENT\;C:\PROGRAM FILES\INTEL\ICLS CLIENT\;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\PROGRAM FILES (X86)\SECURITY INNOVATION\SI TSS\BIN\;C:\PROGRAM FILES (X86)\WINDOWS LIVE\SHARED;C:\WINDOWS\SYSTEM32\WINDOWS SYSTEM RESOURCE MANAGER\BIN;C:\PROGRAM FILES\COMMON FILES\AUTODESK SHARED\;C:\PROGRAM FILES (X86)\TESSERACT-OCR;C:\PROGRAM FILES (X86)\GTKSHARP\2.12\BIN;C:\PROGRAM FILES (X86)\INTEL\OPENCL SDK\2.0\BIN\X86;C:\PROGRAM FILES (X86)\INTEL\OPENCL SDK\2.0\BIN\X64;C:\WINDOWS\IDMU\COMMON;C:\PROGRAM FILES\MICROSOFT SQL SERVER\110\TOOLS\BINN\;C:\PROGRAM FILES\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\DAL;C:\PROGRAM FILES\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\IPT;C:\PROGRAM FILES (X86)\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\DAL;C:\PROGRAM FILES (X86)\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\IPT;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\QT Lite\QTSystem;C:\Program Files (x86)\Common Files\Trane Company\;C:\Program Files\Windows Imaging\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Users\------\bin;D:\------\ws\android_sdk\sdk\platform-tools;C:\Program Files\Mercurial;C:\Users\------\AppData\Local\atom\bin;C:\MinGW\bin

Using gpp-compiler version 2.1.0.

TIA!

Uncaught TypeError: Incorrect value of args option

Enter steps to reproduce below: 1. ... 2. ... Atom Version: 1.5.3 System: Mac OS X 10.11.3 Thrown From: gpp-compiler https://github.com/kriscross07/atom-gpp-compiler package, v2.0.1 ### Stack Trace Uncaught TypeError: Incorrect value of args option At child_process.js:312 TypeError: Incorrect value of args option at normalizeSpawnArguments child_process.js:312:11 at Object.exports.spawn child_process.js:345:38 at ChildProcess. anonymous> /Users/Alexander/.atom/packages/gpp-compiler/index.js:86:20 at emitTwo events.js:87:13 at ChildProcess.emit events.js:172:7 at maybeClose internal/child_process.js:817:16 at Socket. anonymous> internal/child_process.js:319:11 at emitOne events.js:77:13 at Socket.emit events.js:169:7 at Pipe._onclose net.js:469:12 ### Commands -4:26.9.0 gpp-compiler:f5Compile atom-text-editor.editor.is-focused 2x -2:32.4.0 editor:newline atom-text-editor.editor.is-focused -2:27.8.0 autocomplete-plus:CONFIRM atom-text-editor.editor.is-focused.autocomplete-active -2:26.8.0 snippets:next-tab-stop atom-text-editor.editor.is-focused -2:26.8.0 snippets:expand atom-text-editor.editor.is-focused -2:26.8.0 editor:indent atom-text-editor.editor.is-focused -2:26.3.0 core:backspace atom-text-editor.editor.is-focused -2:24.7.0 autocomplete-plus:CONFIRM atom-text-editor.editor.is-focused.autocomplete-active 6x -2:20.3.0 core:backspace atom-text-editor.editor.is-focused 2x -2:11.6.0 autocomplete-plus:CONFIRM atom-text-editor.editor.is-focused.autocomplete-active 2x -2:03.2.0 core:backspace atom-text-editor.editor.is-focused -1:55.1.0 autocomplete-plus:CONFIRM atom-text-editor.editor.is-focused.autocomplete-active -1:50.6.0 core:save atom-text-editor.editor.is-focused 2x -1:48.5.0 gpp-compiler:f5Compile atom-text-editor.editor.is-focused -0:19.7.0 settings-view:check-for-package-updates atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui -0:01.5.0 gpp-compiler:f5Compile atom-text-editor.editor.is-focused ### Config json { core : { disabledPackages : dash , linter-pylint , autocomplete-paths }, gpp-compiler : { gppOptions : -lncurses -std=c 11 } } ### Installed Packages coffee # User atom-beautify, v0.28.22 autocomplete-python, v1.6.1 coffee-compile, v0.21.1 debugger, v0.0.1 file-icons, v1.6.14 gpp-compiler, v2.0.1 language-lua, v0.9.4 linter-clang, v3.4.4 minimap, v4.19.0 minimap-git-diff, v4.1.8 pdf-view, v0.39.0 sync-settings, v0.6.0 # Dev No dev packages

On windows 10, use gcc of the "ubunutu on windows 10"

At the last build Microsoft introduced a new system to run an ubuntu shell "natively" on windows.

Is it possible to add an option to use the g++ installed there instead of the native MinGW ?

EDIT: From the windows command line, compiling somthing with ubuntu's g++ would look like this:
bash -c "g++ -o main main.cpp"

Can't see compiled C files

This is probably a really dumb issue so please bare with me.
I compiled a file named testx.c and ran it through the F5 command. However, I can't see the compiled .exe file on the directory.
screenshot_14

I tried disabling the "Run After Compile" option and all i got was a "Compilation succesful" notification, yet I couldn't find the compiled .exe file. Is this behavior normal or am I missing something?

Uncaught TypeError: Bad argument

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.10.2
Electron Version: 0.37.8
System: Unknown Windows Version
Thrown From: gpp-compiler package, v3.0.7

Stack Trace

Uncaught TypeError: Bad argument

At internal/child_process.js:278

TypeError: Bad argument
    at TypeError (native)
    at ChildProcess.spawn (internal/child_process.js:278:26)
    at Object.exports.spawn (child_process.js:379:9)
    at compile (C:\Users\zhc\.atom\packages\gpp-compiler\index.js:274:31)
    at compileFile (C:\Users\zhc\.atom\packages\gpp-compiler\index.js:216:5)
    at atom-text-editor.subscriptions.add.atom.commands.add.gpp-compiler:compile (C:\Users\zhc\.atom\packages\gpp-compiler\index.js:23:11)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\zhc\AppData\Local\atom\app-1.10.2\resources\app.asar\src\command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (C:\Users\zhc\AppData\Local\atom\app-1.10.2\resources\app.asar\src\command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\zhc\AppData\Local\atom\app-1.10.2\resources\app.asar\src\command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (C:\Users\zhc\AppData\Local\atom\app-1.10.2\resources\app.asar\src\atom-environment.js:1115:28)
    at EventEmitter.outerCallback (C:\Users\zhc\AppData\Local\atom\app-1.10.2\resources\app.asar\src\application-delegate.js:342:25)
    at emitThree (events.js:110:13)
    at EventEmitter.emit (events.js:188:7)

Commands

  2x -1:46.5.0 gpp-compiler:compile (atom-text-editor.editor.is-focused)
     -1:12.9.0 core:move-down (atom-text-editor.editor.is-focused)
     -1:11.6.0 core:move-right (atom-text-editor.editor.is-focused)
  2x -1:11.2.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:10.1.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -1:10.1.0 snippets:expand (atom-text-editor.editor.is-focused)
     -1:10.1.0 editor:indent (atom-text-editor.editor.is-focused)
     -1:09.1.0 core:move-up (atom-text-editor.editor.is-focused)
     -1:08.5.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:02.5.0 core:move-left (atom-text-editor.editor.is-focused)
     -0:56.2.0 core:move-right (atom-text-editor.editor.is-focused)
  2x -0:52.6.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
  2x -0:47.4.0 core:save (atom-text-editor.editor.is-focused)
     -0:04.1.0 gpp-compiler:compile (atom-text-editor.editor.is-focused)

Config

{
  "core": {},
  "gpp-compiler": {}
}

Installed Packages

# User
activate-power-mode, v0.9.0 (active)
gpp-compiler, v3.0.7 (active)
language-cpp14, v0.6.2 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.5.0 (active)
one-light-ui, v1.5.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.3 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.39.0 (active)
find-and-replace, v0.201.0 (inactive)
fuzzy-finder, v1.3.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.2 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.65.0 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.242.2 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.100.2 (active)
timecop, v0.33.2 (active)
tree-view, v0.208.2 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages

Problem launching compiled program

Hi. For some reason I can get my C programs to compile just fine (I've checked on the directory of the C file and the executable is created there correctly), but when it comes to running it's giving me an error, like so:
helloworld 2

I believe the problem is the full path of the program is not being correctly piped into cmd, but I have no idea if that's actually the case, or why it's happening.

This exact issue happens with another C compile&run package called gcc-make-run. I am on Windows8.1, in case it's relevant.

Help would be much appreciated.

Compiling multiple files?

How would you compile multiple files using this plugin? A documentation or link might be helpful?

/tmp/ccfoKnIs.o: In function main':<br>test.cpp:(.text+0x19): undefined reference toadd(int, int)' test.cpp:(.text+0x66): undefined reference to add(int, int, int)'<br>test.cpp:(.text+0xaf): undefined reference totest(bool)' test.cpp:(.text+0xec): undefined reference totest(double)'
collect2: error: ld returned 1 exit status`

I get the above error, which states about the linking problem. I tried selecting the two files and clicked on compile and run, but no luck.

conio.h and iostream: No such file or directory

Hi, I have a problem with the conio.h and iostream librarys, I can´t run my code, this is the out:

Error 1: "C:\Users\Maru\Google Drive\UNADM\Atom Programs\estacionamiento.c:4:18: fatal error: conio.h: No such file or directory

include

^
compilation terminated."

Error 2: "C:\Users\Maru\Google Drive\UNADM\Atom Programs\estacionamiento.c:3:20: fatal error: iostream: No such file or directory
#include
^
compilation terminated."

What´s happend?, I'll be very grateful if you help me, thank you! :)

Gpp not working

I'm using windows 10. When I try to compile using F5, a message pops up saying:

'gcc' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.

Any advice on what to do about it?

P.S. Yes, I installed minGW and added a path to it

Gnome Terminal says a return 0 message.

When I compile and run any c++ program, Gnome Terminal gives "The child process exited normally with status 0." message.

There is also a relaunch button at the end of the message.
This happens when "Hold the program" option is selected in Profile Preference.

Uncaught TypeError: Path must be a string. Received null

path.js:7
Hide Stack Trace
TypeError: Path must be a string. Received null
at assertPath (path.js:7:11)
at Object.parse (path.js:1536:5)
at HTMLLIElement.treeCompile (/Users/JessYuan/.atom/packages/gpp-compiler/index.js:246:21)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1110:28)
at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/application-delegate.js:342:25)
at emitThree (events.js:110:13)
at EventEmitter.emit (events.js:188:7)

can give a option to change compiler?

or just give us all compile and run command.
then we can change it myself.

like this:

c compiler:
gcc

c compiler options:
-Wall -std=c99

cpp...
cpp...

口 after compile pause.(run pause after compile finished.)
口 run after compile.

New terminal window outside of atom

Is it possible to use the package like platformio ide terminal to run program instead of using system app Terminal each time. The user won't have to move out and in of Atom each time. There should be an option for that. Atom would then be like an ide then with gpp compiler + terminal package (like platformio ide terminal etc.)
One stop solution .

error for round function

on using round function an error is displayed.

/tmp/ccZylRcD.o: In function main': day2.c:(.text+0x67): undefined reference toround'
collect2: error: ld returned 1 exit status

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.