Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: tobb on August 07, 2007, 03:27:05 pm

Title: You must select a host application to "run" a library...
Post by: tobb on August 07, 2007, 03:27:05 pm
Hi,

System:
Ubuntu Linux 7.04 Feisty
Code::Blocks nightly build May 23 2007

I want to debug a dynamic library (*.so, shared object) but if a start the debugger I get the Message:
"You must select a host application to "run" a library..."

But where can I do that?
Title: Re: You must select a host application to "run" a library...
Post by: MortenMacFly on August 07, 2007, 03:44:35 pm
But where can I do that?
Menu "Project" -> "Set program's arguments".
With regards, Morten.
Title: Re: You must select a host application to "run" a library...
Post by: lucasba on August 14, 2007, 09:33:02 pm
I have the same problem, in the sense that I have a shared c++ library which I want to debug using python.
I went to Project->Set program's argument and set /usr/bin/python in the dubug target. Launch the debug and the python shell did not materialise...
Infact the program seems to run and than stop.
In the  Project->Set program's argument there are two inputs: "programs" and "host application" and one option which says "This target provides the project's main executable". Any idea of what this means?
Luca
Title: Re: You must select a host application to "run" a library...
Post by: capjohnnybravo on September 03, 2008, 05:41:24 pm
Hi,

I have the same problem but I have more explanations:

I want to debug a python extension (mymodule.so), so the host application is python and argument is "myscript.py" where myscript.py is just "from mymodule import *". But nothing is stopped to the breakpoints (just continue) because:

1- Using the command line "gdb python myscript.py" just not works (cant debug)
2- But doing: "gdb python" then "run" then "myscript.py"  works (CAN debug: can use breakpoints)

I want to do the same thing but using CodeBlocks, but I do not know how to do that. I can just reproduce "1-" but not "2-"

Better explanations can be found here:
http://www.boost.org/doc/libs/1_36_0/libs/python/doc/v2/faq.html#debugging

Any solution ?

Sincerely

John

Title: Re: You must select a host application to "run" a library...
Post by: capjohnnybravo on September 11, 2008, 11:43:57 pm
Hi,

I reask again, how can we debug python applications through codeblocks?

Also I would kine to know if there is a synxtax highlighting for .cmake file and CMakeLists.txt files ?

Thx

John
Title: Re: You must select a host application to "run" a library...
Post by: 198710 on September 12, 2008, 03:37:07 pm
I'm suffering from the same problem~Anyone who can help?
Or can anyone tell me how to compile with the parameter "-ldl"?
Title: Re: You must select a host application to "run" a library...
Post by: capjohnnybravo on September 22, 2008, 12:30:45 am
Hi,

Have you found a solution ?

Sincerely

John
Title: Re: You must select a host application to "run" a library...
Post by: kanak_bit0105 on March 12, 2010, 06:23:44 am
i have faced also the same problem.what is host application?
Title: Re: You must select a host application to "run" a library...
Post by: rcoll on March 12, 2010, 06:43:19 am
i have faced also the same problem.what is host application?

You must create the host application.  If you create a DLL (or any other type of library) then only you know which functions to call and what order to call them in.  So you need to create a host program that will test your library.

Ringo
Title: Re: You must select a host application to "run" a library...
Post by: MortenMacFly on March 12, 2010, 06:43:59 am
i have faced also the same problem.what is host application?
A host application is the main program (executable) that loads your shared library and makes use of it's functions.

Ps.: Please, don't hijack a two years old thread! Topic locked.