Page 1 of 1

CALL ABSOLUTE error "Sub Program Not Defined"

Posted: Fri Dec 14, 2007 10:15 pm
by coma8coma1
I recently moved all my projects to a different system. In the past I was developing on an old Compaq running Win95. Now I've put that old thing away I started working on my fresh install of WinXP on my main system.

Made the identical folders and just copied everything over, code, notes, QB7.1, everything, identical to how it was on the old system. That's how I've always done it. Always works.

Everything's going fine and dandy until I try to incorporate my mouse routines into this new project. QuickBasic Extended is returning a "Sub Program Not Defined" error at the CALL ABSOLUTE line in my mouse code when I try to run it. I go back and check other code from other projects that I KNOW works and same thing; error. won't run. ???!?

I've seen this error from CALL ABSOLUTE before, but that's usually in QBASIC, not QuickBASIC 7.1, so what gives? The only thing that I cant think that's different is the operating system. I'm pulling my hair out here trying to think of what it could be.

And what really gets me is that I've had these programs running on this machine before. New windows install now, doesn' work. Executables work, of course. But QBX chokes on the code.

halp me plz! thanks in advance!

Posted: Fri Dec 14, 2007 11:10 pm
by Nodtveidt
This is one of the most commonly asked questions with QB. What you have to do is start up the IDE with the default quicklibrary loaded. In the case of 7.1, it should be:

Code: Select all

qbx /l
to load the default quicklibrary.

Perhaps before you had a method of loading the library automagically...

Posted: Fri Dec 14, 2007 11:37 pm
by coma8coma1
ha! that's it. thanks bro

i knew it was somethnig obvious. and i was about to give up! thanks again

-coma8coma1

Qbasic does not need a library to run ABSOLUTE!

Posted: Sat Dec 15, 2007 3:12 am
by burger2227
Quickbasic 4.5 and 7.1 require a library for Absolute and Interrupt routines. Qbasic cannot run Interrupt routines.

Make a shortcut to QBX.EXE and add a space /L at the end of the command line in properties. You will have to use the File - Open program menu to run a program using a shortcut.

Ted

Posted: Sat Dec 15, 2007 11:42 am
by Nodtveidt
A better way is to create a batch file.

Code: Select all

@qbx /l qbx.qlb %1

Posted: Sun Dec 16, 2007 1:59 pm
by coma8coma1
funny, it works fine when i double click qbx.exe and load my programs from within, but i cannot double click a .bas file (which i told windows to open with qbx) and run it from there, it still gives the error that way.

i want to be able to doubleclick my bas files like i used to :(

how does one go about making a batch file?

Posted: Sun Dec 16, 2007 2:08 pm
by Nodtveidt
A batch file is merely a text file that you rename the extension to .bat. The file contains normal command line instructions. You could associate .BAS files with the batch file that you would use to start up QBX with the default library loaded.

Posted: Sun Dec 16, 2007 4:03 pm
by coma8coma1
i just made my first file yo!

;)