How to get display dimensions?

Hello,

I want to access monitor size. My computer is 1512x982. I can access this information using TGClient in interactive, but when I compile my program I have a linkage issue. How can I get that working ? Is there a cmake component to include that I am missing ?

Undefined symbols for architecture arm64:
[...]
Undefined symbols for architecture arm64:
Undefined symbols for architecture arm64:
  "TGClient::Instance()", referenced from:
      MyClass::GetDisplayWidth() in MyClass.cc.o
      MyClass::GetDisplayHeight() in MyClass.cc.o
  "TGClient::GetDisplayWidth() const", referenced from:
      MyClass::GetDisplayWidth() in MyClass.cc.o
  "TGClient::GetDisplayHeight() const", referenced from:
      MyClass::GetDisplayHeight() in MyClass.cc.o

Hi Marco,

I would not know if this is easy to do. @couet , @linev, @bellenot : any suggestion?

Best,
Danilo

make sure you link against libGui

1 Like

It works like a charm now :slight_smile: many thanks @bellenot

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.