library not found

New to FreeBASIC? Post your questions here.
Post Reply
tgunda
Posts: 2
Joined: Oct 26, 2019 8:25

library not found

Post by tgunda »

I decided to refresh some very old and dusty quickbasic projects. I'm new to Freebasic and came across some problems:
1) There is no trace of the DEF SEG statement, it cannot be found neither in the Keyword list, nor in the list of obsolete commands. It should be noted somewehere if unsupported.
2) When trying to compile a .bas program like fbc -lang qb -exx -l muscle.lib -p e:\here e:\here\myprog.bas, the compiler stops with the message "cannot find -le:\here\muscle.lib". Same if I use the #inclib and #libpath directives. I tried several variations (relative path, absolute path) in vain. What am I doing wrong?
3) Can old third-party .lib files still be used?
fxm
Moderator
Posts: 12131
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: library not found

Post by fxm »

Welcome to the forum.

1)
See at:
- Differences from QB
- DOS related FAQ (#12)
- PEEK
- POKE
fxm
Moderator
Posts: 12131
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: library not found

Post by fxm »

2)
Maybe try with:
-l muscle
(without suffix)

See:
Compiler Option: -l
tgunda
Posts: 2
Joined: Oct 26, 2019 8:25

Re: library not found

Post by tgunda »

fxm wrote:2)
Maybe try with:
-l muscle
(without suffix)
Thanks, in this form it is recognized. But as I expected "form not recognized". :(
angros47
Posts: 2326
Joined: Jun 21, 2005 19:04

Re: library not found

Post by angros47 »

Helping you would be much easier if you could tell us what your old Quick Basic program is supposed to do. Also, what is that "muscle.lib"? Where did you get it? Static libraries, in Freebasic, usually have the .a extension, and they are in a completely different format (32 or 64 bits, while quick basic libraries are 16 bits). So, if muscle.lib is a 16 bit library, there is no way you can get it to work in FreeBasic, it needs to be rebuilt.

So, your options are:
- you rebuild the muscle library in 32 or 64 bit: you would need its source code for that.... and it would need heavy changes, likely an almost complete rewriting (and the source code likely is NOT written in basic)
-you find a version of that library for modern operating system (if the developer ever made it, and I doubt)
-you modify your program to work without that library (you must know why that library was used, and what it does)
-you find a modern library that can do more or less what that library did (a lot of stuff, like mouse management, is already supported in FreeBasic without external libraries, or can be achieved by using system APIs)

I can't tell you more without knowing what that library did for your program.
Post Reply