Author Topic: You must select a host application to "run" a library...  (Read 36698 times)

tobb

  • Guest
You must select a host application to "run" a library...
« 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?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: You must select a host application to "run" a library...
« Reply #1 on: August 07, 2007, 03:44:35 pm »
But where can I do that?
Menu "Project" -> "Set program's arguments".
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

lucasba

  • Guest
Re: You must select a host application to "run" a library...
« Reply #2 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

Offline capjohnnybravo

  • Single posting newcomer
  • *
  • Posts: 3
Re: You must select a host application to "run" a library...
« Reply #3 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


Offline capjohnnybravo

  • Single posting newcomer
  • *
  • Posts: 3
Re: You must select a host application to "run" a library...
« Reply #4 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

Offline 198710

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: You must select a host application to "run" a library...
« Reply #5 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"?

Offline capjohnnybravo

  • Single posting newcomer
  • *
  • Posts: 3
Re: You must select a host application to "run" a library...
« Reply #6 on: September 22, 2008, 12:30:45 am »
Hi,

Have you found a solution ?

Sincerely

John

kanak_bit0105

  • Guest
Re: You must select a host application to "run" a library...
« Reply #7 on: March 12, 2010, 06:23:44 am »
i have faced also the same problem.what is host application?

Offline rcoll

  • Almost regular
  • **
  • Posts: 150
Re: You must select a host application to "run" a library...
« Reply #8 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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: You must select a host application to "run" a library...
« Reply #9 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ