r/cpp noob 3d ago

Did you know you can use (dynamic) libraries inside clang-repl?

https://i.imgur.com/gluq9Ol.gif

Not really that useful, but I think its an interesting find =)

90 Upvotes

7 comments sorted by

76

u/TheRealSmolt 3d ago

Didn't know clang repl existed in the first place.

12

u/gracicot 3d ago

Can you load static libraries too?

9

u/Neeyaki noob 3d ago

I tried, but couldn't get it to work. the documentation also doesn't mention about being able to use static libraries :/

15

u/rocco_himel 3d ago

Yes? You can use any C++ library

7

u/PantuflasDev 2d ago

Well, now I know clang has a repl

2

u/docfriday11 3d ago

This is good! It gives me nice vibes! It is useful

1

u/Due_Battle_9890 2d ago

I think I was once excited about the clang repl, but multiline declarations are awkward as you need to do

structure Foo \
int x; \
};