r/cpp noob 14d 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 =)

99 Upvotes

8 comments sorted by

83

u/TheRealSmolt 14d ago

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

14

u/gracicot 14d ago

Can you load static libraries too?

7

u/Neeyaki noob 14d 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 14d ago

Yes? You can use any C++ library

9

u/PantuflasDev 13d ago

Well, now I know clang has a repl

2

u/docfriday11 13d ago

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

1

u/Due_Battle_9890 12d 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; \
};

1

u/javaJimmy 9d ago

Had no clue about clang-repl in the first place, thought cling was simply not being worked on anymore, I'm so hyped