On Thu, 2018-01-25, Vir Campestris wrote:
> On 25/01/2018 06:47, blisca wrote:
>> Hello
>>
>> i need some help,please
>>
>> I have installed two c++ environment
>> Code::Blocks and Eclipse Oxygen
>>
>> In both cases a simple "Hello world" project is compiled with 0 errors 0
>> warnings,
>> but i can't debug it.
>> If i set a breakpoint i have this error:
>>
>> No symbol table is loaded. Use the "file" command.
>>
>> I read lot of forum for similar question,checked all the boxes (i
>> think)having to do with debug information generation,but no way
>>
>> Should i re-install MinGw oe what?
>>
>> Please can you help me?
>>
>> Thank you so much for your attention
>>
> I'm going to guess you're running Linux and Gnu tools.
>
> There's a switch "-g" to the Gnu compilers to make them generate debug
> information.
And I'm guessing the IDE has an option to do "debug" builds,
which enables the option under the hood.
IMO, one should always build with -g. It doesn't cost anything but
disk space, and it lets you debug core dumps, debug with valgrind and
so on. And you can always strip the binaries later, if it becomes
necessary.
/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/
snipabacken.se> O o .