Results 1 to 6 of 6
hello all.
I have a simple question: if I have a library (eg libjpeg.a) compiled form source with the debugging option -g, can I use it in order to compile ...
- 05-21-2008 #1Just Joined!
- Join Date
- Mar 2005
- Posts
- 6
using library compiled with -g option
hello all.
I have a simple question: if I have a library (eg libjpeg.a) compiled form source with the debugging option -g, can I use it in order to compile other programs?
Thanks a lot!!!
- 05-21-2008 #2Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
What's the exact problem?
You should be able to use it as long as you instruct the programs you are compiling to use that version of libjpeg (in case that it's not the one installed on your base system).
If that's not what you needed to know, try to be more specific on what the actual problem is.
- 05-21-2008 #3Just Joined!
- Join Date
- Mar 2005
- Posts
- 6
- 05-21-2008 #4
In the ordinary Linux environment, programs and libraries compiled with the -g option are perfectly usable in a non-debugging environment; the extra debugging information in the compiled code is ignored in that situation.
--
Bill
Old age and treachery will overcome youth and skill.
- 05-21-2008 #5Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Now I understand your concern.
But, as wje_lf already told you, you don't need to worry about that. In linux you don't have any problem with debug builds. You can use them just like a regular build. The only "problems" are that it will usually be a bit (or a lot) slower and that the output to sdtout/sdterr will be much versobe sometimes.
- 05-21-2008 #6I don't understand. The only way it would be made slower is that the object code takes longer to read (or swap) into main memory, because of the extra object file information.it will usually be a bit (or a lot) slower
This is not correct. The only difference is that there is extra debugging information in the object files for use by the debugger. If you're not running a debugger, exactly the same code gets executed with or without the -g option.output to sdtout/sdterr will be much versobe sometimes--
Bill
Old age and treachery will overcome youth and skill.


Reply With Quote
