'lib' is not recognized as an internal or external command, operable program or batch file

Hello, everybody!

I am trying to slide a simple program like “Hello, World!” using fpm run --compiler ifx but I get this error message 'lib' is not recognized as an internal or external command.

What is lib and what is my problem?

I am using windows 10, VSCode 1.93.1, ifx 2024.2.1, fpm 0.10.1 alpha

Welcome to the forum @r3isenfe1d!

lib.exe is the MS Windows library archiver, an external program that fpm needs to build a static object collection.

lib.exe is usually shipped with MS Visual Studio and you can check if you can find it under this path: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.XX.XXXXXXX\bin\Hostx64\x64\lib.exe .
So one solution could be to install VS community edition.

As an alternative, fpm will also look for the gcc ar archiver, that you should have if you have the GNU compiler suite installed (i.e. via MSYS2 or minGW).

1 Like

In addition, you may also try to use the intel command prompt. It will set all environment variables required by ifx on Windows. If you look at it, it’s just a batch script spawning a classical cmd with the right paths and variables.

PS: it might be sufficient to install the build tools without having to install the whole VS community edition.

2 Likes

I have a file lib.exe in the path you specified, only in C:\Program Files\, I added the folder ..\x64 to Path, and everything worked, now I have another problem, but about it in the next thread.

1 Like

What’s the script? How do I call it?

Got it!

1 Like