Author Topic: Running a CB project from an external drive  (Read 2265 times)

Offline Grouch

  • Multiple posting newcomer
  • *
  • Posts: 40
Running a CB project from an external drive
« on: May 15, 2016, 06:23:03 pm »
I have a Code::Blocks 13.12 project on an Ubuntu Linux 14.04 (LTS) 64-bit computer.  I would like to make a copy to an external drive (a WD “My Passport” 500 MB  device) and to run the program from that drive.  I copy the program's directory and all subdirectores from the internal drive to the external drive using “cp -r” in a terminal window. I then start Code::Blocks, open the project on the external drive, “build” it (so that all modules are re-compiled). There are 0 errors. I then then attempt to run it, and it stops after 0 seconds. The permissions on the supposedly executable file in the bin/Release subdirectory  are -rw-------. In other words, the supposedly executable is not executable. And chmod cannot make it executable.

Can what I want to do be done? If so, what am I doing wrong? The procedure described works for making a backup copy on the internal disk, but what about an external drive and moving the project to other computers?

Thanks for your attention.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Running a CB project from an external drive
« Reply #1 on: May 15, 2016, 08:05:59 pm »
Probably the external driver is using a non-unix filesystem like fat or ntfs and thus doesn't support setting the executable flag.
The only fix for this is to mount it with special options/permissions which mark all files as executable.

But this is not a topic we can give you detailed help, please ask in a ubuntu/linux related forum/mailing list.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Grouch

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Running a CB project from an external drive
« Reply #2 on: May 15, 2016, 10:15:38 pm »
Thanks. I had come to the same conclusion. I find that I can copy the "should-be-executable" file from the external drive to the internal drive, use "chmod 777 filename" to set its permissions, and then execute it. Alternatively, I can buy another external drive, and format it as ext3 or ext4 before using it. Then I can use it like an internal drive, but it will be useless for transferring data to Windows systems.