jokn
jokn

Reputation: 98

How to use include files in Compiler explorer

I would like to use include files in "Compiler explorer" and tried this with the help from this question.
Include external header file for C on Compiler Explorer But I get allays an fatal error: 'F0_MemMap.h' file not found. This is my project:
https://godbolt.org/z/qqervK1en

Upvotes: 0

Views: 171

Answers (1)

Matt Godbolt
Matt Godbolt

Reputation: 1512

Looks like you've got a "compiler window" that's linked to only that one C++ file. That file will be compiled on its own.

Sorry it's not clearer, but if you close the compiler window, then click "Add New..." on the "Tree #1" (cmake) window, you'll get this: https://godbolt.org/z/4Wv4WhG5E

Here you'll see it's now running the whole project as a CMake build (not just a single file build).

The file inclusions are then found OK; but there are still issues with the build itself (which I haven't tried to look in to).

Hope that helps with your original question!

Upvotes: 3

Related Questions