Weekly Qbasic and Qb64 Lesson Topics
April 18, 2024, 06:58:56 pm
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Want to see a specific Tutorial? ASK!
 
  Home Help Search Arcade Links Staff List Login Register  

Issues with 32 bit application in 64-bit environment

Pages: [1]
  Print  
Author Topic: Issues with 32 bit application in 64-bit environment  (Read 1283 times)
johbu151
Newbie
*
Posts: 3


« on: April 17, 2012, 01:12:58 pm »

Having no experience with QB whatsoever, I am attempting to help someone with a 32-bit 4.5 QB application migrate to a 64-bit environment.  Everything for the application is contained in a single folder, including all programs and QB components. Attempting to run the 32-bit programs in my separate 32-bit environment works fine.  I have downloaded the 64 bit version of QB, and copied the 32-bit app files into the new folder.  However, when I launch QB64 and attempt to open the 32-bit .BAS file to look at/run the code, all I get is a mess of jumbled/random characters.

Do I need to "recompile" the 32-bit .BAS files or anything so that they can be modified/executed with QB64?

Thanks for any help you can provide,
Sean
Report Spam   Logged

Share on Facebook Share on Twitter

GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« Reply #1 on: April 17, 2012, 09:14:25 pm »

Quote
Do I need to "recompile" the 32-bit .BAS files or anything so that they can be modified/executed with QB64?
 From what I understand , you shouldn't be having this problem,  I would try the above first, open the original .bas files, and make sure they appear ok,.. you can use a text editer, also.
 In fact, it might be a good idea to make copys, and save those, as .txt files,  then llok at the file and code, if it appears to be ok, just paste it into the 64 bit qb64 ide, and "run" it to re-compile,  so that the execitable has been compiled with the 64 bit version,  This was a recent discussion , on the same subject.
http://www.qb64.net/forum/index.php?topic=5796.0  
  With the app files ( executable), the ones  compiled with the 32 bit version, would need, ( be dependent) on the DLL files, of the 32 bit version also,.. so you would need to copy those to the same folder, where you are trying to run them from,... I suspect that this is what the problem is,..
 I would try recompiling them first, see what you get, the fact that originaly made with qb4.5,
may complicate this some what, because that is actually intended for Dos, however many of the  .bas files that were used in qb4.5, do compile fine with the qb64 32 bit version, some of the commands have changed , a little, though too,.. So if you get errors, especially illegal functions, or syntax errors,.. you may need to make some adjustments,..
  At http://www.qb64.net there are more active members, a few that have a lot of experience with this, as they have been working with qbasic, right from the start, to qb4.5, and then to the current qb64 versions, and Galleon, the author of qb64, is also available there. Please let us know how this turns out,..
 Oh , and also welcome to the forum, from Garry
Report Spam   Logged

johbu151
Newbie
*
Posts: 3


« Reply #2 on: April 18, 2012, 08:34:15 am »

Thanks for the response Garry.  If it helps, apparently this program hasn't been compiled into an executable. It's actually run with the following command line syntax:

"QB /run smcam_v3.bas /L QWADV.QLB /AH"

I honestly don't understand the impact of things after the /L parameter, but I figured at a minimum, I should be able to run QB64 stand-alone and open the SMCAM_V3.BAS program and view the code.  When I do this with the 32-bit QB, the file opens fine and I can read it.  When I open the exact same file with the 64-bit version, I get all the jumbled ASCII character stuff.  I can also open that file in Windows notepad and read it just fine, so it appears all of the .BAS files in my folder are plain-text. I figured that would be enough of a starting point for someone to tell me what kind of situation I have on my hands.  When I extracted the 64-bit setup, I simply copied all of the files from my 32-bit folder right into the root of the 64 bit folder, and nothing was prompted for overwrite.  Therefore, there wouldn't be any missing dependencies or anything like that.

I tried running the 64-bit command line option like above: "QB64 /run smcam_v3.bas /L QWADV.QLB /AH", but I am getting a "File Not Found", even though all supporting files are available. In 32-bit, I do not get this error and the program appears to launch fine.
 
Does this lead you to any other ideas?
Report Spam   Logged
GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« Reply #3 on: April 18, 2012, 07:28:01 pm »

Code:
QB64 /run smcam_v3.bas /L QWADV.QLB /AH 
Have you just tried it, from the IDE, ?,  Simpley compile the .bas.

 QWADV.QLB, This may be some kind of library, or ? not sure,  and less on the /L,
 I have never tried running qb64 from the command line, and have no clue what the  /L is,
nor the /AH,  it may be that the QWADV.QLB needs to be converted to  a .bi, or some sort of library that qb64 uses.
  I use LINUX Mint, so I can't tell you much, on the command line syntex,..my thoughts are that it sees the /L QWADV.QLB  as the file name,  have you tried it with out the switch,  this is just a quess, but I am thinking,  it loooks for a file named L QWADV.BLB,  and there is none,...
 I don't believe a .bas file can be run that way, from the command line,
 I am going to see if anyone at the qb64.net, will look at this, and see what they say, to be honest some of it is somewhat above my head,  being that I do not use windows, nor have I ever tried using the 64 bit, versions,...
 The only thing I can suggest, maybe is , first compile the .bas, with qb64, from the IDE, (not the command line, ) When you compile it,  qb64 will create a executable, named

smcam_v3.exe

( usually, sometimes I have a problem with it leaving the .exe, named untitled.exe, in which case I have to rename it, so you may want to check that), If it compiles, with no errors, look for the newly created ,  smcam_v3.exe, it should be there in your qb64 folder,..( or untitled.exe ) It sounds to me like in your case, you will be best off , with your qb64 folder, being  empty, no other, .bas or files, other then the ones needed for your program,...if you have a lot of files in your qb64 folder,  temporaily move everything to another folder, that is to say everything  except the files you are working with,.. the other way to go is , install qb64, to a new, empty folder, this is ok, one can have several, folders with qb64.
 OK, back to , """ smcam_v3.exe "", once you compile the .bas, and have your smcam_v3.exe ,  Try again running it from the command line,

QB64 /run smcam_v3.exe/L QWADV.QLB /AH  (((( The only change being smcam_v3.exe , instead of .bas,...))))
  One last though, if any of these files are Visual Basic, then they will not work in qb64, but they wouldn't have worked in the 32 bit version either,.. that is the part that I find "odd", and also do not undertsand,...
 Sorry I am not being much help on this,...Is there any chance you can, make the files available, IE: put them on Drop Box, as a zipped package, ?
 My last suggestion, would be, try compileing something simple, in the IDE,
first open the IDE, type in the code below,  and run it. When you save the file, save it as helloworld.bas,   

Code:
PRINT " HELLO WORLD "   
  after you have compiled, (run) it, look in your qb64 folder, and see if there is a helloworld.exe, there should be,...if not , look for untitled.exe,  run it, it probably will be your helloworld, (test),.. OK, now, try running from the command line,
QB64 /run helloworld.bas ,... I don't think it will "run", it may open the .bas file, but I don't think it will run it,.. Then try QB64 /run helloworld.exe  , it should run, displaying the words HELLO WORLD , on your screen,.. There are some more, more complex examples, that come with QB64, in the QB64/Samples  folder, try some of these, with the 64bit version,
and then also try running them from the command line. I suggest this, to try to determine, if it is the code, or a "bug" with the 64 bit version,   so lets see if some simple code compiles and runs, first,... You may have already tried this, I don't know,..
 Then the next thing we need to figure out is, what the switches do, and what the QWADV.QLB is, and what it is for, ...I have never seen a .QLB file in qb64,...as far as that goes, I have never seen that suffix, in qb4.5, nor qbasic,...so I am thinking this is where the problem is. If so, then we would need to see the file, to see what changes need to be made,.
My guess is , it is some kind of Library file, for the LB, in which case probably that needs to be re written, , some thing way above my head, but like I said, I am going to see if I can get some help on this,..
from Garry
Report Spam   Logged

GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« Reply #4 on: April 18, 2012, 07:48:58 pm »

Sean,
I should have done this first. before I wrote the previous post,..
 Ok, looking at the qb64 wiki, here is what I found,...

Quote

http://qb64.net/wiki/index.php?title=Special%3ASearch&search=qlb&go=Go
…also supports [[$INCLUDE]] text code file Libraries. QB64 does not support QLB Libraries or OBJ files.'''</center>
72 KB (10388 words) - 17:16, 25 March 2012
QB64 FAQ
A: If the libraries are pure QB 4.5 code then yes, otherwise no. QLB files are not supported but you can easily copy your favorite SUBs or FUNC…
53 KB (8298 words) - 14:53, 24 March 2012 

 There is more, you will see, but there are also solutions.
 These also may be of some help:

http://qb64.net/wiki/index.php?title=OS$

http://qb64.net/wiki/index.php?title=ENVIRON$
--------------------------------
Take a look at these, (above), so anyway it looks like we are going to need to see the
QWADV.QLB,  to see what kind of function needs to be made,  obviously, eliminateing the need and use of the file, is going to lead to needing to make changes, in the .bas, file too, because, somewhere in that it is calling for the QWADV.QLB.
  From Garry
 EDIT: I did Find some more info, here:
Quote
I suggest looking at the entire thread,.. but now it is very clear, that in order to get your program working, you are going to need to make changes, with the .QLB file,
 Also, on the qb64.net, if you enter QLB, in the search "BOX", up in the upper right corner, these is a whole lot of discussion on that.
EDIT: Clippy at Qb64.net, said.
Quote
Qbasic is running the file with a QLB library. That's what the /L is saying.

If he has the QLB code in text form he can $INCLUDE it in QB64. Normally he won't have that code however. The library was made by the original coder.
  
 To find out more on using
   $INCLUDE
 
 Ok, well I guess this gives you a lot a material you can look at, that may help you get this working.
from Garry
« Last Edit: April 18, 2012, 09:44:58 pm by GarrisonRicketson » Report Spam   Logged

johbu151
Newbie
*
Posts: 3


« Reply #5 on: April 19, 2012, 09:12:00 am »

Thank you so much for all the effort you put into your reply Garry.  These links and suggestions will get me going in the right direction, so I'll do some trial and error and see what I can get to work.

Thanks again,
Sean
Report Spam   Logged
GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« Reply #6 on: April 19, 2012, 04:50:08 pm »

Ok, no problem, it looks like the "key" will if you can get, or have the,  QWADV.QLB,
Quote
Qbasic is running the file with a QLB library. That's what the /L is saying.

If he has the QLB code in text form he can $INCLUDE it in QB64. Normally he won't have that code however. The library was made by the original coder. 
This explains why it was saying it can't find the file, the /L ,  if after looking at all the info on $include,  you still don't understand, exactly how to work that into the .bas, code,..  I am sure someone on qb64.net will be able to explain that, or give some examples,... Hopefully you do have the  QWADV.QLB, or can contact the author to get it,..
 Anyway good luck,  I am interested to know how this turns out.
fro Garry
Report Spam   Logged


Pages: [1]
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy