LINK USE

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
URSULE

LINK USE

Post by URSULE »

LINK.EXE is apparently necessary to compile a program written in GWBASIC
Running it, it asks for library [.lib] file and I don't know what to enter.THe answer is that the file is not available:"cannot find D:---.LIB
What is also this file D:BRUN45.LIB?
Can somebody explains to me what thes files are doing and what LINK definitively expects?
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows »

I'm not sure about the LINK.EXE and that lib.

brun45.lib is the QuickBasic Runtime. If you are compiling a GWBasic with QuickBasic 4.5 which I think I can safely assume that you are. you need to make sure that your library path is properly set in the QB Ide. That is it has to point to the directory where your brun45.lib currently resides.
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
URSULE

LINK...

Post by URSULE »

Yes you guessed what I m doing.I think that you can help me to finally succeed if you clarify a little bit more.This Brun45 is on"my documents" and LINK.exe as well.What is this library path?
Once I run BC.EXE i gOt this file XYZ.OBJ.How now to get XYZ.EXE?
If I run LINK.EXE, it asks to me this [.OBJ] so i enter my XYZ.OBJ
then it asks list file [---.MAP] Think I can enter XYZ.MAP
and then it asks libraries [.LIB].
What does it mean?
the answer is FATAL ERROR
INVALID OBJ MODULE
Input File: D:BRUN45.LIB pos: 38203 Record Type: 00
Im anxious to find an answer to that because I'm blocked since days.If I could find a brochure on this compiler quickbasic 4.5!But it's so old...
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows »

I'm not sure how your QB 4.5 is currently installed. However, the library path will usually be where your .lib files for quick basic are. .lib and .qlb files as well. Basically open Windows Explorer and go to the directory where you have your quickbasic installed. (typically, if you accepted the defaults it should be in C:\QB or wherever you installed it. In that folder (and sub folders if you have any) look for files with the LIB file extenstion *.LIB the directory where these are is your library path. When asked for the library, enter the directory where you found the .lib files.

This link might help you: it's called porting GW Basic to QBasic
http://scottserver.net/basically/Text%2 ... ortGW.html

It will tell you probably what could have gone wrong and even perhaps what can be changed in the GW Basic code to have it work in QB...In this link it uses QuickBasic 2.0 Compiler. I think it should also work fine with 4.5

If not you might want to to go here:

http://xtcabandonware.com/

And click on the letter Q to see the list of software, as of when I'm writing this message, they have QUickBasic 2.0 available for download. You might want to try compiling with that version instead using this link. Perhaps in version 2.0 some GW BASIC specific functions could not be found in the Quick Basic 4.5 runtime file (that's BRUN45.LIB) that might still be in the Version 2.0 run time library.

Let me know if that helped or not and we'll see what else you can do. Perhaps if you could post the GWBASIC code you are trying to compile, I could see on my computer how to compile and give you more accurate instructions.

Hope this helps
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
URSULE

Link etc

Post by URSULE »

Great.I'm trying anything just to see how it works.
here is a code:(named POKE)
20 DEF SEG
30 X$="DEP"
40 AD=VARPTR(X$)
60 ACH=PEEK(AD+2)*256+PEEK(AD+1)
80 FOR I=ACH TO ACH+PEEK(AD)
110 NEXT I
120 POKE (4736) ,(68)
122 POKE (4737),(69)
123 POKE (4738),(80)
130 PRINT X$

saved under "POKE",A
A for ASCII and accepted by BC.EXE that gave to me a POKE.OBJ
And here I am !
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Re: Link etc

Post by MystikShadows »

Ok, I create a poke.bas file out of this code.

I went to the command prompt and went to the directory where I saved the file poke.bas

here are the steps I had to take:

1. BC poke.bas
2. LINK poke.OBJ
- it asked me
1. Run File [POKE.EXE]: _ I pressed enter accepting it.
2. List File [NUL.MAP]: _ I pressed enter here too.
3. libraries [.LIB]: _ I entered C:\QB45\BRUN45.LIB and pressed enter

It stopped and poke.exe was now created and I executed it.

At step 2.3 here where it asks for Libraries you need to enter the full path and the filename too to where your BRUN45.LIB is. in my case it was in C:\QB45 folder. in your case it might be different...but it will need the path and the filename C:\<PATH>\BRUN45.LIB

Hope this helps
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
URSULE

Link...

Post by URSULE »

IT WORKS!!!!
Thanks,you told me what to do.
Secret was to find the correct directory
and I had to enter my program POKE inside CD QB otherwise it would not have been found by the LINK.EXE!!
I used QB.LIB with LINK and it works: the POKE.EXE was generated.
I really appreciate your help. :D
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows »

You're very welcome :-). Glad to be of help.

If you have any other questions that pop in your mind..Feel free to ask away :-)....
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

If I would have gotton here sooner.... :twisted:
Image
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows »

As the old saying goes, it's the early bird that gets the worm...LOLOL....you wanna help out?...get here sooner ;-)...LOL
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

I doubt he could have helped.
"But...It was so beutifully done"
Levi Fiction

Post by Levi Fiction »

But the second mouse gets the cheese.

After the first reply I remembered an old program I had made to decrypt and compile my .bas files.

Originally I was paranoid that people would try and steal my code, and that they could decompile it. So I made an encryption/decryption prgram. However regular EXE's don't execute regular .bas files so I needed them to compile. I sent the output data from a successful compile to learn how to effectively use BC and LINK.

So if I had been here, this would have been cleared up in no time.
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows »

Aren't we dangerously close to a stereotype of the "How many programmers does it take to change a lightbulb" here? LOLOL

3 one to change it and 2 to say they could have done it ;-)....LOL I just HAD to make that note ;-).

The important thing is her problem is solved, and she's happy, me I don't care who would have solved it. I was there and it got solved. Case closed ;-).
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

Levi Fiction wrote:But the second mouse gets the cheese.
What? :? .... :| .... :) .... :D .... :lol: ha ha, oh ya nice.... :P poor first mouse *cough*MytikShadows*cough*cough*

Hmmm..Lightbulb changing....programmers....how many?

:shock: Mabey we could make a program that does it! :D

Code: Select all

DECLARE SUB Int_Bulbs (Light_Bulb () AS ANY, Number_Of_Bulbs%)
DECLARE SUB Check_Bulb (Light_Bulb () AS ANY, Return_Var%)
DECLARE SUB Unscrew_Bulb (Light_Bulb () AS ANY)
DECLARE SUB Get_New_Bulb (Light_Bulb () AS ANY)
DECLARE SUB Screw_Bulb (Light_Bulb () AS ANY)
TYPE lightbulbtype
  Watts AS INTEGER
  STATUS AS INTEGER
  Index AS INTEGER
END TYPE
Number_Of_Bulbs% = Invetory(&H66)
Int_Bulbs Light_Bulb(), Number_Of_Bulbs%
DO
  Check_Bulb Light_Bulb(), Return_Var%
  IF Return_Var% = 1 THEN
    Unscrew_Bulb Light_Bulb()
    Get_New_Bulb Light_Bulb()
    Screw_Bulb Light_Bulb()
    Number_Of_Bulbs% = Number_Of_Bulbs% - 1
    IF Number_Of_Bulbs% <= 0 THEN EXIT DO
  END IF
LOOP
LOL :lol:
"But...It was so beutifully done"
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

That gives me ideas...
Image
Post Reply