Author Topic: Beginner - pb with my program - C langage  (Read 4381 times)

Offline jpapot

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Beginner - pb with my program - C langage
« Reply #15 on: July 08, 2015, 02:14:34 pm »
Thank you Jens and BlueHazzard.  :D :D

I installed the libsdl dev package and suddenly the compilation is OK !  :)
In the Project->Build options->Linker settings-> Other Linker options ,  `sdl-config --libs` appears.
In the  Project->Build options-> Compiler Settings-> Other options, `sdl-config --cflags` appears.

So this part is a success and the SDL library is recognised.

So I ran the Mandelbrot program I made with c::b under windows (worked good).
It begins well, the Mandelbrot set appears, and suddenly when I use the mouse ( left-clic and right-clic ), the program stops  :o

Do you think that something else could be missing on my system ? (there are many SDL packages ...)

Her are the message the console returns to me :

Code: [Select]
*** Error in `/home/jp/Documents/Mandel/bin/Debug/Mandel': double free or corruption (!prev): 0x08341f98 ***
Aborted

Process returned 134 (0x86)   execution time : 12.095 s
Press ENTER to continue.

Do you know what means " double free or corruption (!prev)" ?

Thanks again for your help if you've got an idea.
Have a good day.

JP

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2566
Re: Beginner - pb with my program - C langage
« Reply #16 on: July 08, 2015, 02:58:43 pm »
Thank you Jens and BlueHazzard.  :D :D

I installed the libsdl dev package and suddenly the compilation is OK !  :)
In the Project->Build options->Linker settings-> Other Linker options ,  `sdl-config --libs` appears.
In the  Project->Build options-> Compiler Settings-> Other options, `sdl-config --cflags` appears.

So this part is a success and the SDL library is recognised.

So I ran the Mandelbrot program I made with c::b under windows (worked good).
It begins well, the Mandelbrot set appears, and suddenly when I use the mouse ( left-clic and right-clic ), the program stops  :o

from this point the work of c::b is done, and for problems after this point you need a other forum for questions... we can not help with 3 party libraries, because there are simply to much and if we answer each question the forum will get bloated...

so i recommend you to ask this question on stack overflow or a sdl forum...

Offline jpapot

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Beginner - pb with my program - C langage
« Reply #17 on: July 08, 2015, 04:21:40 pm »
OK BlueHazzard.

Thanks again for your help and for the advice ! :)

I try with another forum and surch with google of course.

Have a nice day (and good nights too !)  8)

JP

Offline marcelinux

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Beginner - pb with my program - C langage
« Reply #18 on: July 09, 2015, 08:15:12 am »
Or you can use the debuger.
I just need learn a little bit more. Thank you for your help.

Offline jpapot

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Beginner - pb with my program - C langage
« Reply #19 on: July 09, 2015, 02:12:21 pm »
Hello.

I posted my problem on the Stack Overflow forum, and someone founded. (A line had to be suppressed)
The program runs even better now than before !!!

It calculates and displays the Mandelbrot set. You can use the left clic of the mouse to zoom inside the image ( down and up to draw a square)

Thanks to Marcellinux, BlueHazzard and Jens for their answers.
If someone is interested, I can post the code as a gift.  ;D

(It's for a 1680x1050 pxl screen, but one can change those valors at the beginning). It's probably possible to make the program better of course  ;)

Have a nice day.  8)

JP