Hey guys, it's been ages since I last posted, back on the (I guess?) old .net forum (I've been away so long I don't even know what happened there, etc).
Anyhow, today I needed to run a simple QB program and found my old install (v1.0 - yay) of QB64 wasn't working right (it gave a compile error on even the simplest of code), so I installed the latest version of QB64 (after a lot of trials of issues where I had to modify the g++ command to load missing libs on the command line). Once I got past that, it installed fine.
BTW - I am doing all this on a very customized and munged up version of Ubuntu 14.04 LTS - long in the tooth, and beat to within an inch of it's life - mainly just to keep it up-to-date enough to continue to compile and run stuff (someday, hopefully soon, I'm going to wipe this system and start fresh with something more recent; until then, I work with what I got).
So once I got things installed, I tried to compile a simple program (nothing more than CLS: PRINT "Hello World") - which also failed - had to make a similar mod as before to the command line libraries, to include glibc - something like "-lstdc++" or something like that).
Once that was in place, I could compile the simple hello world test case. So then I jumped into the deep end and decided to try out one of the OpenGL examples - that worked ok. I tried a few other examples - games, old-skool stuff, just various junk for the samples folders. Everything was compiling and working fine.
So then I decided to try one of my old pieces of code. I don't know if any of you were around back in the day or recall - but for a little bit I was playing around with QB64, updating it's IDE to fix some quirks (many of which are still there, btw - sigh) - and this was all prior to OpenGL integration, at least for Linux. So - I took one of my old QB4.5 demos I had, messed around with _MAPTRIANGLE - and came up with a rotating cube demo, and posted it on the (old?) forum.
Actually - I think I may have a copy on my github - yeah, here it is:
https://github.com/andrew-ayers/qb64/tree/master/mt_cube_v2But when I run it, it throws a "Invalid Handle" error - and I don't know why. So - just so I didn't think I was crazy, I decided to try out this 3D engine code I had found on a thread on the old forum, I don't recall who wrote it (they were a genius tho!) - called "portals" - it was basically a simple "portal style" rendering engine. It does something similar in that it loads up various images for "texture files", then uses that data via the handle it has assigned - for instance, something like:
Where it would die would be in the "_SOURCE handle" part, throwing the "Invalid Handle" error on that line (in my cube demo case, it throws it on the _MAPTRIANGLE line). I thought maybe - at least in the case of the portal engine (because my cube demo explicitly defines the variables properly) - because it didn't define the handle variable as a long, it needed that; so I threw in a "DIM handle AS LONG" - but the error persists.
As far as I can tell, all of this code is written properly, and there shouldn't be any errors. At this point, I don't know if I should suspect my system, my code (or the "portal code"), or QB64 - or some strange combo of "all of the above" as to causing this error.
Again, I note that I had to make modifications to the install script to pass in "-lstdc++ -lm" on the g++ command line in the installer (for QB64 compilation), and I had to do the same within "makeline_lnx.txt" just to get programs to compile and run.
But all the other examples run correctly - including the OpenGL examples (which of all I would expect them first to fail, being the most likely complex?).
So - I know I've written a book here - but does anyone have any idea what the problem could be? Has this been encountered before?
BTW - if a copy of the portal engine is wanted for testing, and it wasn't carried over to this new forum - I can possibly supply it too.
Thank you guy's for any help or insights!
EDIT: I just wanted to post the kind of errors I was getting that made me change the g++ compile options:
/usr
/bin
/ld: libqb
/os
/lnx
/libqb_setup.o: undefined reference
to symbol
'_ZNSi5tellgEv@@GLIBCXX_3.4' //usr
/lib
/x86_64
-linux
-gnu
/libstdc
++.so.6:
error adding symbols: DSO missing from command
line
They were all similar to the above - again, this happened during the time when I was installing QB64, and then once I updated the command line options and got it installed (and the IDE popped up and ran), then on compiling a simple example, I got similar errors that were only correct by making the same modification.