alainhuck
Newbie
Posts: 5
|
|
« on: April 03, 2011, 09:42:15 am » |
|
Hello everybody
I'd programmed an utility using QB45 19 years ago. It still works with WINDOWS XP
I'd completed qb45 with qlib which added some useful functions
Now i can't use my utility with 7 64bits
I wonder if qb64 can recompile my old code using qlib something like that : QB64 test.bas /L C:\QB45\LIB\QLIB\QLIB.QLB
Thanks for your answers
Regards
Alain
PS : Apologyse for my poor english !
|
|
|
|
|
OlDosLover
Guest
|
|
« Reply #1 on: April 03, 2011, 09:51:14 am » |
|
Hi all, Welcome to the forum alainhuck. Yes and no. You carnt directly compile and "link" your version of the qlib into QB64. If you still have the text version of the library it can be included as a "bi" library with the include metacommand. Alternatively if you know what your library does the contents can be added into the main program. QB64 does not suffer from any size limitation's that i know of. So any program (as long as it fits in memory) can be compiled. Other than decomposing your qlib into text there's nothing i know of that would work. OlDosLover.
|
|
|
|
GarrisonRicketson
Admin
Administrator
Hero Member
Posts: 583
|
|
« Reply #2 on: April 03, 2011, 12:29:55 pm » |
|
Mostly to say welcome to the forum,.. I don't know to much on the recompileing,..but I have seen several programs that had been done in qb4.5, and re-compiled in qb64, so it appears it can be done, as to how, I am not so sure... from Garry
|
|
|
|
OlDosLover
Guest
|
|
« Reply #3 on: April 03, 2011, 12:41:51 pm » |
|
Hi all, I believe that he is talking about a qbasic user built library. In qbasic you can compile a lib into a qlib. You load the qlib and all the subs and functions inside that lib are available to your program. QBasic does not allow 2 lib's to be loaded simultaneously so often you combine your lib and the default QB.lib into a new lib and load QB45 with that new combined lib. The trouble is all the subs and functions inside the qlib are not available as text. When qbasic compiles it links into spersifec libs where QB64 does not use lib's that way. So if he has a text copy of the original subs and function they can be incorporated into his QB64 program as text and then compile or as a bi library. OlDosLover.
|
|
|
|
alainhuck
Newbie
Posts: 5
|
|
« Reply #4 on: April 04, 2011, 06:34:06 am » |
|
Hello Garry and OldOsLover
Thanks a lot for your answers
When i used QB45, i'd made my own code and i still have a text copy of that When i compiled it i use line commands like that :
C:\QB45\BC test /O /X; C:\QB45\LINK /EX /NOE test,,NUL,C:\QB45\LIB\BCOM45.LIB+C:\QB45\LIB\QLIB\QLIB.LIB
In qb64 i didn't find BC and LINK so i think i have to use some thing like : QB64 %1 /L C:\QB45\LIB\QLIB\QLIB.QLB in order to load QLIB.QLB and my own code in memory and then use the make EXE menu to compile.
Perhaps there is another way to do ?
Regards
Alain
|
|
|
|
OlDosLover
Guest
|
|
« Reply #5 on: April 04, 2011, 08:56:08 am » |
|
Hi all, Welcome back alainhuck. This line shows that you LINK 2 libs. C:\QB45\LINK /EX /NOE test,,NUL,C:\QB45\LIB\BCOM45.LIB+C:\QB45\LIB\QLIB\QLIB.LIB QB64 cannot use 16 bit library's. QB64 does not use LINK. It is not possible to use your source file and those librarys (in object code) within QB64. If you post the source code we may be able to point to what it is that QB64 carnt or wont use that in the libs. It is possible that you are using a keyword that isnt recognised by QB64 , etc. Im sorry but thats the best i can come up with without seeing the code. If you wish not to release the source then you could email it to me. The letter under my name is the address. OlDosLover.
|
|
|
|
alainhuck
Newbie
Posts: 5
|
|
« Reply #6 on: April 04, 2011, 10:51:25 am » |
|
Hello,
Thanks for your proposal I'll send you by mail my code But i think there's a lot of instruction i used that are in QLIB and not in QB45
If you can look and tell me what i can do ... I'll apreciate
Regards
Alain
|
|
|
|
OlDosLover
Guest
|
|
« Reply #7 on: April 04, 2011, 10:54:03 am » |
|
Hi all, Oki.
From the wiki
Q: Can I use the same libraries with QB64 that I used with QB 4.5?
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 FUNCTIONs to a text BI file and $INCLUDE them at the end of ANY program. Include them AFTER all SUB and FUNCTION code in the BAS file! As of Dec 3, 2010 QB64 acquired DECLARE LIBRARY to allow users to reference C, Windows, SDL and other DLL libraries. If you find some functions that you like please share them with us at the forum! The following pages list working functions our members have found and tested:
OlDosLover.
|
|
« Last Edit: April 04, 2011, 12:05:20 pm by OlDosLover »
|
Report Spam
Logged
|
|
|
|
OlDosLover
Guest
|
|
« Reply #8 on: April 05, 2011, 03:36:06 am » |
|
Hi all, From chronokitsune on QB64.net How compilation works (as far as I've observed): 1. QB64 translates QB64 code to C++ code and outputs the result to text files in the <qb64dir>\internal\temp[2,3,4,etc.] directory/directories. Those text files are used in #include statements in the main QB64 "runtime" (which resides in the file <qb64dir>\internal\c\qbx.cpp). 2. The file <qb64dir>\internal\c\qbx.cpp is compiled using the GNU C++ compiler as a subprocess of the QB64 compiler using the line in <qb64dir>\internal\c\makeline.txt.
As you can see it uses it own librarys. OlDosLover.
|
|
|
|
OlDosLover
Guest
|
|
« Reply #9 on: April 05, 2011, 12:35:04 pm » |
|
Hi all, alainhuck i got your email. On opening it and looking this is what i think. 1] Its in French? , im Australian and dont understand french. 2] Your bi file lists all the subs and functions. Do you have a text file (the contents) of each of those individual sub + functions named inside the bi? If you do then that will make this process more possible. 3] I think this may be beyond me but i suggest we investigate it furthur. OlDosLover.
|
|
|
|
OlDosLover
Guest
|
|
« Reply #10 on: April 07, 2011, 11:54:10 am » |
|
Hi all, I loaded the attachments into my dos 6.22 computer and loaded the lib. No success as it says "no found". So i need to know how did you load the lib file into QB45 at the command line level? Also Your bi file lists all the subs and functions. Do you have a text file (the contents) of each of those individual sub + functions named inside the bi? If you do then that will make this process more possible. OlDosLover.
|
|
|
|
alainhuck
Newbie
Posts: 5
|
|
« Reply #11 on: April 07, 2011, 11:56:47 am » |
|
Hello OldOsLover
First i want to thank you to take of your time to look at my code
Here my anwers 1) Yes i'm french so my code is in french : i can translate somme parts if you need 2) I purchased QLIB so i don't have the code of the subs contained in the .bi file
I tried ti put at the beginning of my code something like :
DECLARE LIBRARY 'C:\QB45\LIB\QLIB\QLIB.LIB' SUB InsertOff () SUB CursorOff () SUB ClrScreen (BYVAL value&) .... END DECLARE
When i've finished all the defs of the subs and functions qb64 says OK !! So i tried to make .exe There's a DOS window that appears but i don't have the time to see the messages After a moment the window is closed and qb64 says c++ compilation errors
How can i see the error messages ?
Regards
Alain
PS : I use the line command : C:\QB45\QB SAUVEDGN /L C:\QB45\LIB\QLIB\QLIB.QLB
|
|
|
|
OlDosLover
Guest
|
|
« Reply #12 on: April 07, 2011, 12:03:36 pm » |
|
Hi all, I purchased QLIB so i don't have the code of the subs contained in the .bi file Well thats going to make it impossible unless the author releases you a text copy of that lib. Next step i think would be to rewrite it as QB64 as we can not use the compiled lib any way that i know of. I'd suggest you post at QB64.net and see if anyone over there has any ideas. In the synatx checking is a bat file to reveal the compolation error more throughly. Id suggest you read that post and from there try to ask Galleon directly. OlDosLover.
|
|
|
|
alainhuck
Newbie
Posts: 5
|
|
« Reply #13 on: April 07, 2011, 12:18:13 pm » |
|
Thanks again OldOsLover
I think i'll rewrite all my code using visual studio (vbasic or c)
Alain
|
|
|
|
|
|