| |
| |
| |
|
Page: 1 2
Comments:
<0> again, without seeing the code, nothing I can do but wild guesses <0> but I do agree, ##c++ has an attitude problem <1> Arena does not name a type.. does this ring a bell? <1> I would love to post the code.. but its like a lot of files etc that are interlinked.. <0> of course, it rings the same bell as yours, the "forgot to #include header file bell". <1> how can that ****ing be... <0> sandesh, have you seen the movie Blade Runner <1> yes but I don't remember... <0> sandesh, do you remember the beginning, when they Voight-Kampff tested a replicant and asked him "you are walking through a desert and find a turtle turned upside down, and it can't get around on its own. You can't turn it upside down. What do you do" <0> Do you remember how the replicant, when faced with that conundrum, reacted with hostility? <0> And executed the examiner? <1> yes <1> Well.. <1> (...) <0> sandesh, you're the turtle, ##c++ is the examiner <0> the replicant, I mean
<0> I botched the allegory. Your code is the turtle, and you're the examiner <1> Yea.. if you ask to easy questions you get slapped around if you ask to difficult question they feel infiriour to you and slap you around :P <1> but that's besides the point.. <1> I wanna figure out what is wrong.. I am gonna restart my compiler <2> restart your compiler? O_o <1> my cross platform IDE <1> :P <2> IDE != compiler =P <2> and it won't make any diference <1> we never know.. lets see <0> I was thinking, has he been in Visual Studio for 2 hours, purely making edit & continue edits? <1> I found the mistake <1> its crazy <1> how on earth could I have known... <1> how on earth could have anyone known... <1> but it makes sense <1> even with #define... <0> share <1> I have in arena.hpp #include "sprite.hpp" and in sprite.hpp #include "arena.hpp" <1> now I took #include "sprite.hpp" away in arena.. and in compiles.. with ***ign(Arena *anArena) <0> What I do is very rarely do I include .hpp files in other .hpp files <1> you do it in the cpp file? <0> Yes. <1> I had that.. but at some point it asked for it.. <1> so I got into the habbit... <0> You don't need Arena.hpp for ***ign(Arena *anArena) anyway, ***ign(cl*** Arena *anArena) does the job <1> is that possible? Will it know it belongs to my Arena cl***? <0> it's a forward declaration. ##c++ has a factoid for it, one moment <0> http://jcatki.no-ip.org/fncpp/CircularDependency and http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.11 <1> Metabol: you need to define sometimes .hpp files in .hpp files.. I just took away the include "sprite.hpp" of my arena.hpp and included it though in sprite.cpp and it doesnt compile <1> aaagh.. no-ip.org doesnt work on this internet <2> sandesh: uh... what? <1> I mean include not define <2> 20:29 < sandesh> aaagh.. no-ip.org doesnt work on this internet <1> I am on a restricted internet in China.. I am not Chinese, just on business trip <1> a lot of sites are banned here <2> sandesh: ouch <0> sandesh: Here's the bourgeoise fascist counter revolutionary no-ip.org link, it's good: http://cpp.sourceforge.net/?show=28840 <1> Metabol.. how do you solve the problem of not including hpp files in your hpp file? By forward declaration? <0> yeah <1> okay.. let me read <0> If I have cl*** Foo as a full member variable of cl*** Bar, Bar.hpp might #include Foo.hpp, but if I allow that kind of thing to propagate through the code, sooner or later any little edit of any header file causes a full recompile <1> yea.. Can I always use forward declaration instead? <1> and keep my hpp files clean from includes? <0> cl*** Foo { Bar m_bar; }; // needs Bar.hpp, forward declaration doesn't work <1> but cl*** Bar; cl*** Foo {Bar m_bar;}; works? <0> no <0> cl*** Bar; cl*** Foo {Bar* m_bar;}; works <0> also, cl*** Bar; cl*** Foo {Bar& m_bar;}; works <1> ohh I see.. you have to reference it <1> I read it.. just wasnt sure was aggregation by reference meant <0> it makes sense, the compiler knows the size of a pointer or a reference, without having seen the cl*** <1> that's right.. wow.. I feel smarter! <1> :P <1> I gave up my old game project because of cross dependency.. I thought the error was in my code and didn't know the trick <1> I had 25k line code at that time <0> The C++ books gloss over this stuff <0> also cl*** Bar; cl*** Foo { Bar Baz(); }; // works, does not need to know Bar to be able to declare a function returning Bar <1> I got some boookies here.. I look here and there as reference but what I read I often forget <2> hey <2> does SDL_Flip() sleep on all systems?
<1> can a function return a cl***? I thought its not possible? <0> No idea...but why should it? <2> every one I tested til now slept and kept it at a 60fps framerate, or similar <0> sandesh: sure it's possible, I think even in C functions can return structs <0> yuriks: fullscreen? Could your videodriver do the sleeping? <2> Metabol: fullscreen and windowed <1> I think it sleeps.. I have this in my code: if( SDL_Flip( screen ) == -1 ) { return 1;} taken from a tutorial <1> thus suggesting it does <1> SDL_UpdateRect will do the trick inbetween <2> hmm, in what header are bool, true and false defined? <0> they are a part of C++ <0> keywords <2> sandesh: just checking if I should bother making timekeeping code <2> Metabol: C <1> stdlib? dunno <2> C99 <0> ah, sorry <1> probably not necessary since your monitor has a refresh rate <2> hmm <2> stdbool.h <1> but have a framekeeping code though, if you plan to move with equal speed <1> I am so glad to have solved out that interdependancy chicken egg thing.. <1> I am really struggling with those pointers big time: I get a build log error objs\main.o:main.cpp:(.text+0x6a7): undefined reference to `Arena::***ign(Sprite*)' <1> and I got arena_gamestart.***ign(pSprite); <0> another ##c++ factoid, not 100% correct but often enough <0> !undefined reference <0> <nolyc> undefined reference is a linker error. It's not a compile error. Adding #includes doesn't help. You did not define the thing in the error message, or you forgot to link the file that defines it, or you forgot to link to the library that defines it. Check which one. (Note that on some compilers it's called unresolved external symbol or similar) <1> Doh! forgot Arena:: before the member function.. such a newb mistake.. I guess it means I lack sleep <1> I read that book.. think C++.. since then I am in the habbit to think what I am doing instead of doing it <2> uh <2> my program is segfaulting when I call SDL_PollEvent in: <2> while( SDL_PollEvent(&event) ) { <2> if I comment out an unrelate qsort it works fine <2> http://rafb.net/p/RtIQns74.html <3> Hello :) <1> is there a font library for sdl under windows? <2> SDL_TTF <1> I don't think I can compile that one under windows <1> at least I think they make it extremely difficult to do so <2> you can <1> well the makefile is for linux only <2> uh... <1> and it writes in the documentation type ./config to configure it.. <2> you need msys <1> msys? <2> it's like bash for windows =P <2> so you run ./configure and then make <1> yea.. <1> let me see if I can find it <1> well I got ming32-make.. if its that <2> no <2> get the entire msys <1> ok <2> so you can run configure <1> btw. irc seems to be your main compiler :P <2> hm? <1> well unless you got two screens (one for your compiler and one for mirc) you are always answering extremely fast on this channel :) <2> hmm, tabbed term, you know <2> and I use irssi =P <1> msys is it msdos? <2> and I thnk you're mistaking compiler with IDE =P <2> and I don't use an IDE <2> sandesh: uh? <1> I downloades msys.exe and it says 16 bit os fault protection error <2> hmm <2> something is wrong with your PC, since msys is a 32-bit app, and that's just the installer anyway <1> we're talking about msys-1.0.9.exe? <2> yeah <1> or shall I download the developer kit? <2> you should donload both, you have mingw already? <1> ahh no okay.. its working now <2> btw, why don't you simple get binaries? IIRC there were binaries <1> I downloaded it again <1> do you have windows or r u on linux?
Return to
#sdl or Go to some related
logs:
gentoo 45qt3 perl m/\s(\S*)/; cascading list js
#linux sdl_config fc5 fdisk -l
cannot open /proc/partitions mp3 hot white cum #ubuntu #gaim #math
|
|