# Rocq cannot find libraries in Rocq platform

**URL:** https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973
**Category:** Using Rocq
**Created:** [March 13, 2026, 10:43am UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973 "2026-03-13T10:43:06Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![JanM](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@JanM](https://discourse.rocq-prover.org/u/JanM)
#### Post date: [March 13, 2026, 10:43am UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/1 "2026-03-13T10:43:06Z")

</div>

I recently installed the newest version of the Rocq platform on Windows. However, when I try to use Rocq I get an error message telling me that the Rocq libraries cannot be found.

> cannot guess a path for Rocq libraries; please use -coqlib option or ensure you have installed the package containing Rocq’s prelude (rocq-core in OPAM) If you intend to use Rocq without prelude, the -boot -noinit options must be used.

This error message indicates I need to specify the location of the library using a -coqlib option. It is, however, unclear to me where I should use this option and I could not find a documentation of that option, either.

As far as I am aware the libraries should have been installed with the Rocq platform installation and they do show up in the lib folder, so I do not think missing libraries are the problem.

I did add the Rocq platforms bin folder to my PATH, so that should not be the issue either.

Does anyone know what to do to solve this problem?

---

<div class="post-metadata">

### Author: ![Justme0606](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/justme0606/32/1216_2.png) [@Justme0606](https://discourse.rocq-prover.org/u/Justme0606)
#### Post date: [March 16, 2026, 8:17am UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/2 "2026-03-16T08:17:25Z")

</div>

Hi,  
You try to use wich version of the Rocq Platform ? 2025.08.2 ?  
Best regards,

---

<div class="post-metadata">

### Author: ![JanM](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@JanM](https://discourse.rocq-prover.org/u/JanM)
#### Post date: [March 16, 2026, 9:06am UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/3 "2026-03-16T09:06:12Z")

</div>

I was using 2025.08.0 downloaded on February 20th. I did not realize newer versions had come out since then. Thanks for pointing this out. I’ll try out the 2025.08.2 version and report back.

---

<div class="post-metadata">

### Author: ![Justme0606](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/justme0606/32/1216_2.png) [@Justme0606](https://discourse.rocq-prover.org/u/Justme0606)
#### Post date: [March 16, 2026, 9:18am UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/4 "2026-03-16T09:18:55Z")

</div>

No worries, the website was recently updated to point to the new version.  
Feel free to reach out if you still encounter issues with the installation or when using it.

---

<div class="post-metadata">

### Author: ![JanM](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@JanM](https://discourse.rocq-prover.org/u/JanM)
#### Post date: [March 16, 2026, 9:19am UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/5 "2026-03-16T09:19:38Z")

</div>

I just installed the new version and I still encounter the same issue.

---

<div class="post-metadata">

### Author: ![Justme0606](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/justme0606/32/1216_2.png) [@Justme0606](https://discourse.rocq-prover.org/u/Justme0606)
#### Post date: [March 16, 2026, 9:33am UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/6 "2026-03-16T09:33:37Z")

</div>

I’m sorry to hear that.  
It’s strange but i will try to understand what is the problem and fix it.  
So you installed the latest version and when you try to use rocq on a terminal you have the message “cannot guess” ? Right ?  
You use VSCode and VSrocq extension too ?

---

<div class="post-metadata">

### Author: ![Justme0606](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/justme0606/32/1216_2.png) [@Justme0606](https://discourse.rocq-prover.org/u/Justme0606)
#### Post date: [March 16, 2026, 9:45am UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/7 "2026-03-16T09:45:23Z")

</div>

I think you are using `rocq-shell`. When I use it, I get the same error as you. I will need to fix this script.

---

<div class="post-metadata">

### Author: ![JanM](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@JanM](https://discourse.rocq-prover.org/u/JanM)
#### Post date: [March 16, 2026, 9:46am UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/8 "2026-03-16T09:46:54Z")

</div>

> [@Justme0606](#):
>
> It’s strange but i will try to understand what is the problem and fix it.

Thank you.

> [@Justme0606](#):
>
> So you installed the latest version and when you try to use rocq on a terminal you have the message “cannot guess” ? Right ?

Yes. However, `rocq.exe --version`produces

> The Rocq Prover, version 9.0.1  
> compiled with OCaml 4.14.2

so Rocq can be found.

> [@Justme0606](#):
>
> ou use VSCode and VSrocq extension too ?

No, I use proof general with emacs. The issue occurs both with emacs and when trying to compile a file or even if I just try to start the repl in the terminal.

---

<div class="post-metadata">

### Author: ![Justme0606](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/justme0606/32/1216_2.png) [@Justme0606](https://discourse.rocq-prover.org/u/Justme0606)
#### Post date: [March 16, 2026, 9:59am UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/9 "2026-03-16T09:59:44Z")

</div>

I reproduced the same error on side. It seems to be a problem with the Windows installation, since Rocq cannot find its library path properly. I will investigate and fix it.  
Thanks for your feedback.

---

<div class="post-metadata">

### Author: ![Justme0606](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/justme0606/32/1216_2.png) [@Justme0606](https://discourse.rocq-prover.org/u/Justme0606)
#### Post date: [March 16, 2026, 10:40am UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/10 "2026-03-16T10:40:41Z")

</div>

I found the fix.  
I think the problem comes from `rocq-shell.bat`,  
I will patch the script and create a new minor release.

In the meantime, you can fix it temporarily by running and tell me if it’s ok after that

```auto
set COQLIB=%CD%\lib\coq
set ROCQLIB=%CD%\lib\coq
set PATH=%CD%\bin;%PATH%

```

---

<div class="post-metadata">

### Author: ![JanM](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@JanM](https://discourse.rocq-prover.org/u/JanM)
#### Post date: [March 16, 2026, 12:29pm UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/11 "2026-03-16T12:29:35Z")

</div>

Where am I supposed to run this? I guessed powershell but that does not work as it does not recognize %PATH% as anything.

---

<div class="post-metadata">

### Author: ![Justme0606](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/justme0606/32/1216_2.png) [@Justme0606](https://discourse.rocq-prover.org/u/Justme0606)
#### Post date: [March 16, 2026, 1:08pm UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/12 "2026-03-16T13:08:36Z")

</div>

Sorry, the previous commands were for `cmd.exe`.  
If you are using PowerShell, please run:

```auto
$env:COQLIB="$PWD\lib\coq"
$env:ROCQLIB="$PWD\lib\coq"
$env:Path="$PWD\bin;" + $env:Path

```

If you are using `cmd.exe`, use:

```auto
set COQLIB=%CD%\lib\coq
set ROCQLIB=%CD%\lib\coq
set PATH=%CD%\bin;%PATH%

```

Please run them from the Rocq Platform installation directory, then try again and let me know whether it works.

---

<div class="post-metadata">

### Author: ![JanM](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@JanM](https://discourse.rocq-prover.org/u/JanM)
#### Post date: [March 16, 2026, 1:24pm UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/13 "2026-03-16T13:24:58Z")

</div>

Thanks. That does indeed seem to resolve the problem locally in the particular powershell instance (I can start the repl).However it still occurs everywhere else, e.g. when trying to edit a file in emacs or when running make from WSL. Does it make sense to create environment variables COQLIB and ROCQLIB with these values (the bin folder is already in my PATH)?

---

<div class="post-metadata">

### Author: ![Justme0606](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.rocq-prover.org/justme0606/32/1216_2.png) [@Justme0606](https://discourse.rocq-prover.org/u/Justme0606)
#### Post date: [March 16, 2026, 1:42pm UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/14 "2026-03-16T13:42:09Z")

</div>

Yes, setting the `COQLIB` and `ROCQLIB` globally should work as a temporary workaround if you want Rocq to work from environments like Emacs or WSL.

I identified one issue in `rocq-shell.bat`, which I will patch in the next minor release. However, I am still investigating whether there is a more complete fix without requiring manual environment variables.

For now, defining `COQLIB` and `ROCQLIB` globally is probably the safest workaround.

---

<div class="post-metadata">

### Author: ![JanM](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@JanM](https://discourse.rocq-prover.org/u/JanM)
#### Post date: [April 24, 2026, 10:01am UTC](https://discourse.rocq-prover.org/t/rocq-cannot-find-libraries-in-rocq-platform/2973/15 "2026-04-24T10:01:30Z")

</div>

I tried the new release and it fixed the issue. Thanks a lot.
