ld: Undefined reference to symbol

Solution Verified - Updated -

Issue

  • In RHEL 6, symbols from libraries linked as dependencies could be resolved by ld, but this behavior changed in RHEL 7 and RHEL 8.

  • Compile fails with error "Undefined reference to symbol".

/usr/bin/ld: /tmp/ccPIpRiP.o: Undefined reference to symbol 'glOrtho'

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content