When I tried to compile the "power.bas" example program it halts with
... unable to locate libgmp-3.dll
The suggested re-install did not solve the problem.
A quick search of the FreeBasic folder did not find it
The closest match was libgmp.dll.a in the \lib folder
Do i need to create this file?
Where is libgmp-3.dll
http://www.google.com/search?q=download ... =firefox-a
The fb package would be to big if all these dll's were included.
The fb package would be to big if all these dll's were included.
Re: Where is libgmp-3.dll
libgmp-3.dllharmonv wrote:When I tried to compile the "power.bas" example program it halts with
... unable to locate libgmp-3.dll
The suggested re-install did not solve the problem.
The libgmp.dll.a IS in the \lib folder.
I have:
c:\Program Files\freebasic\lib\win32\libgmp.dll.a
c:\Program Files\freebasic\lib\win32\libgmp-3.dll.a
c:\Program Files\freebasic\lib\win32\libgmp-3.dll
The file is where I would expect it to be, however FB cannot find it.
I re-installed fb v.23 -- same problem
I re-installed fb v.24 -- same problem
I re-installed fb v.25 -- same problem
The system is XP SP3
i ALSO found libgmp-10.dll and tried renaming it to libgmp-3.dll & libgmp-3.dll.a
BUT still FBIDE says it cannot find the file.
I placed copies of the above in the c:\freebasic\lib\win32 directory and in the local working directory: c:\fb1\
Where should I place the libgmp-3.dll.a so that fb can file it?
I have downloaded several versions of the libgmp.dll from the GMP web site and other sites that had the library.
Apparently, I have the library -- but Freebasic (using FBIDE) cannot see it.
Code: Select all
#include once "gmp.bi"
dim as mpz_t num
mpz_init(@num)
mpz_clear(@num)
print "create init & cleared"
sleep
Anyone have ANY idea what I can try next?The application failed to start because libgmp-3.dll was not found.
Re: Where is libgmp-3.dll
*.a and *.dll.a files are used when linking, they should go into FreeBASIC/lib/win32, or into the directory from which you invoke fbc to compile your program (the current/working directory), so the linker can find them.
*.dll files are used by the program at runtime, they go next to your program.exe or into C:\Windows\system32, so the system can find them.
Note: I think if you're using FBIDE's quick-run feature it will actually create a temporary FBIDETEMP.bas file and compile and run that from inside the FBIDE installation directory, so in that case you may have to put the .dll there.
*.dll files are used by the program at runtime, they go next to your program.exe or into C:\Windows\system32, so the system can find them.
Note: I think if you're using FBIDE's quick-run feature it will actually create a temporary FBIDETEMP.bas file and compile and run that from inside the FBIDE installation directory, so in that case you may have to put the .dll there.
Re: Where is libgmp-3.dll
I placed the libgmp-3.dll.a in the same directory as the FBIDE : "application failed to start because it could not find the file...dkl wrote:*.a and *.dll.a files are used when linking, they should go into FreeBASIC/lib/win32, or into the directory from which you invoke fbc to compile your program (the current/working directory), so the linker can find them.
*.dll files are used by the program at runtime, they go next to your program.exe or into C:\Windows\system32, so the system can find them.
Note: I think if you're using FBIDE's quick-run feature it will actually create a temporary FBIDETEMP.bas file and compile and run that from inside the FBIDE installation directory, so in that case you may have to put the .dll there.
using the console & compiling, same result.
(just to make sure the setup was working, other programs compiled & ran from the console)
copied the file to c:\windows\system32\libgmp-3.dll.a
compiled ok; run: same result, could not find the file.
rename c:\windows\system32\libgmp-3.dll.a libgmp-3.dll
compiled from the console: THE PROGRAM WORKED.
compiled from within FBIDE; the program worked.
@dkl
THANKS
that's copasetic
THEREFORE:
Does that mean that on my system: xp sp3 (using fbc version 0.24)
ALL LIBRARIES need to be moved to the Windows\System32\ directory AND renamed without the suffix ".a"
That does not align with the FreeBasic documentation about the particular path order.
Re: Where is libgmp-3.dll
Hmm no, *.dll.a files are different from *.dll, the *.dll.a is a small fake library that's included in the program.exe, telling the system that this program.exe needs that *.dll, which is the one with the real code. Normally the two wouldn't be renamed, but only put in the proper location.
Re: Where is libgmp-3.dll
My 0.24.0 installation has only libgmp.dll.a in the lib\win32\ directory. libgmp.dll.a is an “import” library for libgmp-3.dll, and if you open it in a text editor you should be able to see a bunch of __imp____gmp_… entries and the DLL name. As a test I downloaded the dynamic GMP library and header file for MinGW from here:
http://cs.nyu.edu/exact/core/gmp/
Since I try to avoid polluting my system32 directory with things like this, I extracted libgmp-3.dll and copied it to my working directory, then compiled with this batch file:
And everything worked as expected.
http://cs.nyu.edu/exact/core/gmp/
Since I try to avoid polluting my system32 directory with things like this, I extracted libgmp-3.dll and copied it to my working directory, then compiled with this batch file:
Code: Select all
"c:\program files\freebasic\fbc" -w pendantic -v -C -R -s console power.bas
pause