Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: mikex on March 18, 2008, 09:06:44 pm
-
I am trying to open a .cpp file to edit by executing a 'codeblocks theFile.cpp' command from another program, but I get the following message:
Another program instance is already running.
I only want one copy of codeblocks running, I just want 'theFile.cpp' to come up in the editor under a new tab. Is there some undocumented command line switch that will send a signal to codeblocks dde server to just open the file?
I'm running under windows XP SP2 and I've tried associating .cpp with codeblocks and issuing a 'cmd.exe theFile.cpp' but that just blocks execution in my calling program even though I've issued the command asynchronously.
-
Hi,
If you want to open a new file in CodeBlocks you could use the shell extension plugin, that integrates a file explorer in CodeBlocks.
See the manual http://www.codeblocks.org/user-manual section "File Explorer and Shell Extension Plugin" for details.
Bye,
Mario
-
I am trying to open a .cpp file to edit by executing a 'codeblocks theFile.cpp' command
if CB is associated with .cpp files, it should be enough to use "theFile.cpp" as the command line (it at least works at the dos prompt, but if it doesn't work in your program you might try "cmd /c theFile.cpp" instead). it shoud be asynchronous.
-
Worked like a charm dmoore, that /c did the trick.
Many thanks :D