Missing Include Library

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

Missing Include Library

Post by storm5510 »

I cannot seem to locate this:

#include once "big_int/big_int_full.bi"

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

Re: Missing Include Library

Post by fxm »

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

Re: Missing Include Library

Post by srvaldez »

@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: 59
Joined: Nov 28, 2019 15:47

Re: Missing Include Library

Post by storm5510 »

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: 59
Joined: Nov 28, 2019 15:47

Re: Missing Include Library

Post by storm5510 »

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: 3373
Joined: Sep 25, 2005 21:54

Re: Missing Include Library

Post by srvaldez »

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

Re: Missing Include Library

Post by fxm »

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: 59
Joined: Nov 28, 2019 15:47

Re: Missing Include Library

Post by storm5510 »

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.
Post Reply