Coder Social home page Coder Social logo

Comments (8)

kriscross07 avatar kriscross07 commented on June 11, 2024 2

The new version of atom-gpp-compiler that was just released should allow you to compile multiple files by selecting the files you want to compile in tree view, right click, and click Compile and run.

from atom-gpp-compiler.

KristianKorsgaard avatar KristianKorsgaard commented on June 11, 2024 1

I'm also having difficulties compiling multiple files, with package 3.0.7, running ubuntu 16.04. g++ CLI works fine.

EDIT: After more than an hour troubleshooting (and of course a few minutes after posting this) I finally got it working. Here's what to do, and what not to do:

DON'T right click on the file name, where a larger menu will appear if other plug-ins are installed, when wanting to press "Compile and Run"
image

DO right click on the blank space right beside the file name. Here a smaller menu will appear and you can press the "Compile and Run" or other commands without linking problems.
image

from atom-gpp-compiler.

kriscross07 avatar kriscross07 commented on June 11, 2024

Can you include the file at the top of test.cpp with #include "otherFile.cpp" or #include "otherFile.h"?

from atom-gpp-compiler.

vinothbabu avatar vinothbabu commented on June 11, 2024

I tried including the header file, but it seems to throw the same error...

/tmp/ccaBYY9Q.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`

When i enter into command line and execute g++ test.cpp functions.cpp it works fine....

from atom-gpp-compiler.

TijmenUU avatar TijmenUU commented on June 11, 2024

Using Atom 1.19.4 in combination with gpp-compiler 3.0.7 package still produces the same result mentioned by vinothbabu for me. Likewise, using the g++ CLI works fine here too.

My platform is Windows 10 x64 1703 and g++ (GCC) version 5.3.0 is installed.

Any ideas?

from atom-gpp-compiler.

TijmenUU avatar TijmenUU commented on June 11, 2024

Yeah, just like with deleting multiple files, using the context menu restricts selection to whatever you're right clicking. Seems to be a bug with Atom.io itself.

from atom-gpp-compiler.

anmol281 avatar anmol281 commented on June 11, 2024

@KristianKorsgaard i have tried but it is not working...

i am trying to use class declaration using (.h) and (.cpp) declaration.....

from atom-gpp-compiler.

aleksaa01 avatar aleksaa01 commented on June 11, 2024

Issue for me was that the path to those files contained a space character, and because of that it couldn't compile.
Error:
'E:\C++_Projects\C++' is not recognized as an internal or external command, operable program or batch file.

And the path to those files was:
"E:\C++_Projects\C++ Example\example.cpp"
and
"E:\C++_Projects\C++ Example\example2.cpp"

Renaming "C++ Example" folder to "C++_Example", solved the problem...

from atom-gpp-compiler.

Related Issues (20)

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.