News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

You must select a host application to "run" a library...

Started by tobb, August 07, 2007, 03:27:05 PM

Previous topic - Next topic

tobb

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?

MortenMacFly

Quote from: tobb on August 07, 2007, 03:27:05 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

lucasba

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

capjohnnybravo

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


capjohnnybravo

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

198710

I'm suffering from the same problem~Anyone who can help?
Or can anyone tell me how to compile with the parameter "-ldl"?

capjohnnybravo


kanak_bit0105

i have faced also the same problem.what is host application?

rcoll

Quote from: kanak_bit0105 on March 12, 2010, 06:23:44 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

MortenMacFly

Quote from: kanak_bit0105 on March 12, 2010, 06:23:44 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]