Thread: How to use cygwin to run code from codeblocks?

  1. #1
    Registered User
    Join Date
    Dec 2019
    Posts
    99

    How to use cygwin to run code from codeblocks?

    Does anyone know how to do this? I tried saving the file on my desktop then I entered it into cygwin. And it said it didn't recognize the file?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Are you talking about an executable file (i.e., a compiled and linked program), or are you talking about a source file?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Dec 2019
    Posts
    99
    Quote Originally Posted by laserlight View Post
    Are you talking about an executable file (i.e., a compiled and linked program), or are you talking about a source file?

    I am talking about a file saved on the computer.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Yes, but I'm asking about that file. What file is it?

    If you're talking about a generic "file saved on the computer", then no, you cannot run it from your Cygwin environment because that file is probably not executable, i.e., it cannot be run as a program.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Registered User
    Join Date
    Dec 2019
    Posts
    99
    Quote Originally Posted by laserlight View Post
    Yes, but I'm asking about that file. What file is it?

    If you're talking about a generic "file saved on the computer", then no, you cannot run it from your Cygwin environment because that file is probably not executable, i.e., it cannot be run as a program.
    Laserlight, you are too kind for this world. I figured it out. And now I can run files on cygwin using g++. Pretty neat.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code not working in codeblocks
    By md1178208 in forum C Programming
    Replies: 1
    Last Post: 06-28-2018, 02:15 AM
  2. CodeBlocks / GCC / Cygwin Installation Windows 10
    By c00b in forum C Programming
    Replies: 4
    Last Post: 10-11-2016, 03:30 AM
  3. no error of compilation but my code makes codeblocks bug
    By funnydarkvador in forum C++ Programming
    Replies: 3
    Last Post: 03-19-2013, 12:31 AM
  4. code not working in codeblocks?
    By jamort in forum C++ Programming
    Replies: 4
    Last Post: 11-09-2009, 09:26 PM
  5. Problems with compiling code in cygwin
    By firyace in forum C++ Programming
    Replies: 4
    Last Post: 06-01-2007, 08:16 AM

Tags for this Thread