![]() |
| | #1 |
| #junkie Join Date: Oct 2004
Posts: 240
| Glut and Dev C++, Programs not Quitting? When i run the program, and quit, by either Esc or the Close Box Button, Dev C++ will not compile or run another program. Aparently it thinks my program is still running, and i have to press program reset. I want to know is this a problem with the coding of the program? Ie is it actually not closing and causing memory leaks and whatnot? Or is this another quirk of Dev C++ i am missing? Because i have had Dev C++ do that before, however not with opengl programs. I believe it was incorrectly coded Win32 programs. Anyway thanks again to anyone that helps, hopefully this will be the last of my quirk bugs lol. Then ofcourse we got syntax, coding, and ect. Bugs. Thanks all
__________________ 01110111011000010110110001100100011011110010000001 11000101110101011010010111010000100000011011000110 10010110011001100101001000000111100101101111011101 0100100000011011100111010101100010 |
| Zeusbwr is offline | |
| | #2 |
| I am the worst best coder Join Date: Mar 2002
Posts: 644
| We can't tell you when we have nothing to see... Anyways, I'm assuming you didn't add a PostQuitMessage(0); inside your WM_DESTROY.
__________________ poems by me |
| Quantrizi is offline | |
| | #3 |
| #junkie Join Date: Oct 2004
Posts: 240
| I dont know, i didnt add anything. It is all tutorials i got online, not changed at all. No errors during the build, just a after effect of runtime if you will. I'll try and post a sample Tutorial tonight, a exact txt of one or two im using, then try to include the links of them. If i can find the links lol, i download them into mht format cuz my comp isnt on the internet lol. (obviously im not on mine ).
__________________ 01110111011000010110110001100100011011110010000001 11000101110101011010010111010000100000011011000110 10010110011001100101001000000111100101101111011101 0100100000011011100111010101100010 |
| Zeusbwr is offline | |
| | #4 |
| erstwhile Join Date: Jan 2002
Posts: 2,223
| >>I'll try and post a sample Tutorial tonight<< If the project is small enough, just zip it up and attach it to your post. That way it should be easier for someone else to test your code exactly as you have (compiler switches, libs etc).
__________________ CProgramming FAQ Caution: this person may be a carrier of the misinformation virus. |
| Ken Fitlike is offline | |
| | #5 |
| #junkie Join Date: Oct 2004
Posts: 240
| Well here it is, hope this is what you wanted lol. My .dev file and .cpp file from a tutorial that is not working correctly. Hopefully, by what you said, the dev file contains all the project info such as libs, ect. Anyway, i dont know jack about opengl or glut, i am learning the basics of glut to allow me to code in opengl (windowed), and other benifits of it obviously lol. Anyway, thanks for the help
__________________ 01110111011000010110110001100100011011110010000001 11000101110101011010010111010000100000011011000110 10010110011001100101001000000111100101101111011101 0100100000011011100111010101100010 |
| Zeusbwr is offline | |
| | #6 |
| erstwhile Join Date: Jan 2002
Posts: 2,223
| Works for me, which doesn't help you much. You don't have to forward declare your 'main' function, BTW, but that isn't the problem. I tested your code with under winxp sp2 using glut 3.7.3. If your not using that version of glut then try it and see if that helps. Also check the task manager to see if the program is exiting properly or it's just an issue with dev-cpp.
__________________ CProgramming FAQ Caution: this person may be a carrier of the misinformation virus. |
| Ken Fitlike is offline | |
| | #7 |
| #junkie Join Date: Oct 2004
Posts: 240
| i think i am using 3.7.6 if i remember right, but like i said it RUNS fine. Which is why im seeking help also from dev c++ ppl, thinking it may have to do something with c++. But ya, like i said it runs properly but Dev C++ says it is still running after every run, it makes me Alt-F2 to close it, then it will let me compile or run through devcpp again. I havent checked the task manager to see if its still running though, but i will when i get home (got places to be atm lol). Thanks
__________________ 01110111011000010110110001100100011011110010000001 11000101110101011010010111010000100000011011000110 10010110011001100101001000000111100101101111011101 0100100000011011100111010101100010 |
| Zeusbwr is offline | |
| | #8 |
| #junkie Join Date: Oct 2004
Posts: 240
| Yes it remains in processes, any ideas on what is wrong with the code? There has to be some simple shutdown function i am leaving out, hmm.
__________________ 01110111011000010110110001100100011011110010000001 11000101110101011010010111010000100000011011000110 10010110011001100101001000000111100101101111011101 0100100000011011100111010101100010 |
| Zeusbwr is offline | |
| | #9 |
| erstwhile Join Date: Jan 2002
Posts: 2,223
| >>Which is why im seeking help also from dev c++ ppl<< Dev-cpp is just an ide for MinGW. >>There has to be some simple shutdown function i am leaving out<< Glut handles windowing, including startup and shutdown code. I've updated my version of glut to 3.7.6 and cannot reproduce your problem with dev-cpp 4.9.9.0. The only thing I can suggest at this point is that you 'clean' the project prior to rebuild and if that doesn't solve the problem then create a new project making sure that the project path has no spaces in it.
__________________ CProgramming FAQ Caution: this person may be a carrier of the misinformation virus. |
| Ken Fitlike is offline | |
| | #10 |
| #junkie Join Date: Oct 2004
Posts: 240
| ya i know the compiler is MinGW, i dont think it is a problem with the compiler, more the ide/source. Which is why i ... as i said, was looking for help from devcpp ppl lol, so maybe they can help with a quirk. But anyway, man, this is weird. Iv created a bunch of dif projects from these default tutorial sources, and i still get the same result. Dunno what to say :/
__________________ 01110111011000010110110001100100011011110010000001 11000101110101011010010111010000100000011011000110 10010110011001100101001000000111100101101111011101 0100100000011011100111010101100010 |
| Zeusbwr is offline | |
| | #11 |
| #junkie Join Date: Oct 2004
Posts: 240
| Here is the exe of the program in question too, does it do it on your comp?
__________________ 01110111011000010110110001100100011011110010000001 11000101110101011010010111010000100000011011000110 10010110011001100101001000000111100101101111011101 0100100000011011100111010101100010 |
| Zeusbwr is offline | |
| | #12 |
| Registered User Join Date: May 2004
Posts: 1,362
| I dont have glut installed so i couldnt run it (needs glut32.dll) Are you sure you are shutting down glut properly and the end of your code?
__________________ |
| sand_man is offline | |
| | #13 |
| #junkie Join Date: Oct 2004
Posts: 240
| if you scroll up to another attachment you can see my code. But to answer your question, "No". Ken said it runs fine, my code that is, it came from a tutorial so i didnt code it at all. I do not know glut what so ever, nor opengl. Im trying to learn, but i have this to get over.
__________________ 01110111011000010110110001100100011011110010000001 11000101110101011010010111010000100000011011000110 10010110011001100101001000000111100101101111011101 0100100000011011100111010101100010 |
| Zeusbwr is offline | |
| | #14 |
| #junkie Join Date: Oct 2004
Posts: 240
| gah, found the problem. Sorry all. Aparently there was a problem with the dll i used with the glut version i had. i replaced the dll with the one from OpenGL.com's site, (glut32.dll) and my programs now work like a charm. Sigh. Thanks for all your help , btw Ken, where did you get your version of 3.6.7? I need one that works lol.
__________________ 01110111011000010110110001100100011011110010000001 11000101110101011010010111010000100000011011000110 10010110011001100101001000000111100101101111011101 0100100000011011100111010101100010 |
| Zeusbwr is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OpenGL/GLUT in Dev C++ | Nextstopearth | Game Programming | 3 | 10-01-2008 05:25 AM |
| How to Install Glut? | Zeusbwr | Game Programming | 3 | 11-26-2004 05:42 PM |