Missing Include Library

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
storm5510
Posts: 20
Joined: Nov 28, 2019 15:47

Missing Include Library

Postby storm5510 » Nov 30, 2019 13:26

I cannot seem to locate this:

#include once "big_int/big_int_full.bi"

Anybody?
fxm
Posts: 9316
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Missing Include Library

Postby fxm » Nov 30, 2019 13:34

Inside the 'inc' directory of FreeBASIC (for Windows).
srvaldez
Posts: 2160
Joined: Sep 25, 2005 21:54

Re: Missing Include Library

Postby srvaldez » Dec 01, 2019 1:24

@storm5510
while the include is where fxm noted, the library is not included in the distribution but you can get the windows binary or build it yourself, see viewtopic.php?f=14&t=25082&p=224933#p224933
storm5510
Posts: 20
Joined: Nov 28, 2019 15:47

Re: Missing Include Library

Postby storm5510 » Dec 02, 2019 13:56

fxm wrote:Inside the 'inc' directory of FreeBASIC (for Windows).


It is not in what I have. If it is there, it must have a different name. I found, and downloaded, an archive mentioned in another post here...
storm5510
Posts: 20
Joined: Nov 28, 2019 15:47

Re: Missing Include Library

Postby storm5510 » Dec 03, 2019 13:09

I believe I have a naming problem. In one of the test programs, there is this:

Code: Select all

#include "big_int.bi"


When I run the compiler, I get this:

Code: Select all

C:\FB\bin\win64\ld.exe cannot find -lbig_int


This is in big_int.bi:

Code: Select all

#include once "big_int/big_int_full.bi"


The actual name of the library is libbig_int.a. This is really scrambling my brain. Anyone?
srvaldez
Posts: 2160
Joined: Sep 25, 2005 21:54

Re: Missing Include Library

Postby srvaldez » Dec 03, 2019 13:36

you need to either compile or download the library as suggested in my post above and place it in the lib\win64 folder
fxm
Posts: 9316
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Missing Include Library

Postby fxm » Dec 03, 2019 14:08

Look at page Compiler Option: -l

-l < libname >
is the command to add the library libname to the linker's list:
- where '-l' is only a prefix to add a library file,
- and 'libname' is the user name of the library.

The internal name of the static library becomes 'lib < libname> .a' on the disk.

Therefore:
'-lbig_int' must be interpreted as '-l < big_int >'
=> user name of the library: 'big_int'
=> internal name of the library (on the disk): 'lib < big_int > .a' = 'libbig_int.a' (for a static library)
storm5510
Posts: 20
Joined: Nov 28, 2019 15:47

Re: Missing Include Library

Postby storm5510 » Dec 04, 2019 23:42

srvaldez wrote:you need to either compile or download the library as suggested in my post above and place it in the lib\win64 folder


I did this, at the time. As it turned out, the compiler was not looking for it in lib\win64. It was looking for it in bin\win64. I do not know if this will be a problem in the future, or not.

Either way, it is working now. Thank you all for your replies.

Return to “Libraries”

Who is online

Users browsing this forum: No registered users and 1 guest