User forums > Help
Beginner - pb with my program - C langage
jpapot:
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: ---*** 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.
--- End code ---
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
BlueHazzard:
--- Quote from: jpapot 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
--- End quote ---
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...
jpapot:
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
marcelinux:
Or you can use the debuger.
jpapot:
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
Navigation
[0] Message Index
[*] Previous page
Go to full version