Author Topic: Problem opening files from command line  (Read 3493 times)

Offline hiddenbit

  • Single posting newcomer
  • *
  • Posts: 3
Problem opening files from command line
« on: March 04, 2016, 07:27:40 pm »
Hello all.

Just installed codeblocks 16.01 on Ubuntu 14.04, over an older version (13.something iirc). The problem is that when i try to open any file from the command line, while there is a running instance, I get this:

codeblocks test.txt
Starting Code::Blocks Release 16.01  rev 10760 Feb  2 2016, 03:11:29 - wx2.8.12 (Linux, unicode) - 64 bit

but nothing happens (although the window down in the task bar get highlighted). If there is no running instance then a new one is started and the file is loaded in it.

I have enabled:
Allow only one running instance,
Use an already running instance (if possible)
and
Bring it on top afterwards.

Thanks for your time.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Problem opening files from command line
« Reply #1 on: March 06, 2016, 07:13:06 am »
Try opening test.c instead of test.txt file.

There was something posted a while back about you having to setup handles for file types.

If it works with ".c" then likely you need to setup handles in CB for it.

Tim S.

Hello all.

Just installed codeblocks 16.01 on Ubuntu 14.04, over an older version (13.something iirc). The problem is that when i try to open any file from the command line, while there is a running instance, I get this:

codeblocks test.txt
Starting Code::Blocks Release 16.01  rev 10760 Feb  2 2016, 03:11:29 - wx2.8.12 (Linux, unicode) - 64 bit

but nothing happens (although the window down in the task bar get highlighted). If there is no running instance then a new one is started and the file is loaded in it.

I have enabled:
Allow only one running instance,
Use an already running instance (if possible)
and
Bring it on top afterwards.

Thanks for your time.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline hiddenbit

  • Single posting newcomer
  • *
  • Posts: 3
Re: Problem opening files from command line
« Reply #2 on: March 06, 2016, 11:47:25 am »
Unfortunately the same happens for any file type, i just used the test.txt for the example.

While toying around I noticed that when there is no instance running and I try codeblocks *, a new instance is started up and all the files are opened, but when from another terminal i try to open any other file then all the files that were opened with the * are loaded again, but not the one single one.

Same happens when instead of codeblocks * i start a new instance and load only one file, then if i close this file (but not the instance) and I open some other file, then the first file is loaded again.
« Last Edit: March 06, 2016, 11:53:18 am by hiddenbit »

Offline hiddenbit

  • Single posting newcomer
  • *
  • Posts: 3
Re: Problem opening files from command line
« Reply #3 on: May 01, 2016, 03:26:43 pm »
Sorry for resurrecting this thread but the problem appeared again.

Last time not being able to find a solution i went back to using version 13.12. Yesterday I installed Ubuntu 16.04 and the same problem appeared with 13.12 too. So I tried version 16.01. I still cannot open files from the command line but this time an error box/window appears saying "The project file does not exist...". Can someone please help as I depend on codeblocks for my work.

Thanks.

Edit: It appears that it does open files from the command line, only if they belong to an/the open project. Else they are ignored.
« Last Edit: May 01, 2016, 03:51:37 pm by hiddenbit »