[Solved] FBImage use in DOS

DOS specific questions.
Post Reply
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

[Solved] FBImage use in DOS

Post by Gablea »

Hi all,

Does anyone know if I can use the FBImage functions in a DOS application?

I have tried to compile a program that uses that function and I get

ld: cannnot find -lFBImage-32-static

Would I be right in thinking this will not work for DOS?

Andy
Last edited by Gablea on Jun 15, 2023 11:41, edited 1 time in total.
angros47
Posts: 2331
Joined: Jun 21, 2005 19:04

Re: FBImage use in DOS

Post by angros47 »

It might work if the library itself is compiled for DOS. You should try with DJGPP compiler.

By the way, what are you trying to do?
angros47
Posts: 2331
Joined: Jun 21, 2005 19:04

Re: FBImage use in DOS

Post by angros47 »

I don't know why I have done this, but...

https://www.mediafire.com/file/glqfwy7w ... tic.a/file

Here is the library compiled for DOS by me. Put it in the "lib\dos" directory in the FreeBasic directory, it should work
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: FBImage use in DOS

Post by Gablea »

angros47 wrote: Jun 14, 2023 12:10 It might work if the library itself is compiled for DOS. You should try with DJGPP compiler.

By the way, what are you trying to do?
I'm using the library to load .jpeg images for my point of sale system to make it a bit more streamline with the code

And thanks for the library I shall try that when I'm back at the office.
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: FBImage use in DOS

Post by Gablea »

angros47 wrote: Jun 14, 2023 14:33 I don't know why I have done this, but...

https://www.mediafire.com/file/glqfwy7w ... tic.a/file

Here is the library compiled for DOS by me. Put it in the "lib\dos" directory in the FreeBasic directory, it should work
I downloaded the file Thank you for that and I saved it in the following location c:\fbc\lib\dos but when I run fbc -g -exx npos.bas I still get the error message

ld: cannnot find -lFBImage-32-static

Do you think this could be because of the 8.3 file format in dos?
angros47
Posts: 2331
Joined: Jun 21, 2005 19:04

Re: FBImage use in DOS

Post by angros47 »

It is possible. I used the dos prompt on an old Windows XP machine to test it, and it worked. If you are using pure dos with 8.3 limit it might fail
Either you use a DOS that supports longer filenames (you need it only to compile, the compiled file will run anywhere), or you rename the library and edit the include files.
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: FBImage use in DOS

Post by Gablea »

Ok so it was the evil 8.3 file name that's making the problem

Can you tell what file(s) I need to edit so I don't break my system.


Would I need to complie the library for a pure dos system?
Last edited by Gablea on Jun 15, 2023 11:38, edited 1 time in total.
angros47
Posts: 2331
Joined: Jun 21, 2005 19:04

Re: FBImage use in DOS

Post by angros47 »

Does it work on a system that supports longer filenames?

By the way, the file you need to edit is fbimage.bi, and you need to find the line:

Code: Select all

# inclib "FBImage-32-static"
and replace it with something shorter. If you rename the library as LIBFBIMA.a, for example, you can edit it as

Code: Select all

# inclib "FBIma"
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: FBImage use in DOS

Post by Gablea »

angros47 wrote: Jun 14, 2023 22:35 Does it work on a system that supports longer filenames?

By the way, the file you need to edit is fbimage.bi, and you need to find the line:

Code: Select all

# inclib "FBImage-32-static"
and replace it with something shorter. If you rename the library as LIBFBIMA.a, for example, you can edit it as

Code: Select all

# inclib "FBIma"
Thank-you for that I have done that and it works :)
Post Reply