Page 2 of 2

Re: Segmentation fault when loading a mesh

Posted: Mon Apr 01, 2013 11:46 pm
by axtyax
ill try changing the path for sydney.md2 but shldnt it work 'cus sydney.md2 is it the same folder as the source.

Re: Segmentation fault when loading a mesh

Posted: Mon Apr 01, 2013 11:48 pm
by axtyax
mybe the executable is not in the same folder?

Re: Segmentation fault when loading a mesh

Posted: Tue Apr 02, 2013 12:01 am
by axtyax
it wld help if u tell me the command for building with the console!

Re: Segmentation fault when loading a mesh

Posted: Tue Apr 02, 2013 11:31 am
by Mel
The path is relative to the executable, hence, if you don't provide a path, the first place to look for is where the executable is located.

And the console build command is normally make, but you have to create a makefile first for your programs

Re: Segmentation fault when loading a mesh

Posted: Tue Apr 02, 2013 2:11 pm
by axtyax
well it wld really help if u told me how to find out where the executable is located when u build with code::blocks

Re: Segmentation fault when loading a mesh

Posted: Tue Apr 02, 2013 2:29 pm
by axtyax
well, it returned -1, so what does that mean?

Re: Segmentation fault when loading a mesh

Posted: Tue Apr 02, 2013 2:34 pm
by axtyax
so i moved the image to where the executable is but it still wont load.

Re: Segmentation fault when loading a mesh

Posted: Tue Apr 02, 2013 5:08 pm
by Mel
What returned -1?

You have to move the mesh file, not just the image. (so you found where your executable is)

And please, keep all your questions in single posts.

Re: Segmentation fault when loading a mesh

Posted: Tue Apr 02, 2013 7:37 pm
by axtyax
the program returned -1 when i ran it.
what do u mean by the mesh file?
it is only a .md2 program and a texture for it.

Re: Segmentation fault when loading a mesh

Posted: Tue Apr 02, 2013 11:21 pm
by Mel
Aren't you loading a mesh? that is your mesh, if the program exited with -1 it means something went wrong, though i can't tell what. Check the IDE documentation to know more in depth.

And read and study more about C, C++ and computers in general. If you have such errors, you sure are very, very, green in this to handle something like Irrlicht, or any programming library in general.

Re: Segmentation fault when loading a mesh

Posted: Thu Apr 04, 2013 8:07 am
by hybrid
The main program will return whatever you tell it to return. So check the code where it says 'return -1' to see where it exits

Re: Segmentation fault when loading a mesh

Posted: Sat Apr 13, 2013 12:44 am
by axtyax
it does not say to return -1 in the code at all.
code::blocks is returning -1

Re: Segmentation fault when loading a mesh

Posted: Sun Apr 14, 2013 10:09 pm
by hybrid
Most IDEs return the value the app returned.