Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9217483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:38:37+00:00 2026-06-18T02:38:37+00:00

I build a C++ project of mine using clang++ , using the following command

  • 0

I build a C++ project of mine using clang++, using the following command line command (split into lines):

clang++
  -std=c++11
  -W -Wall -Wextra -pedantic -Wno-newline-eof -Werror
  -O4
  -I<dirs>
  -L<dirs>
  -l<libs>
  -framework <frameworks>
  -D <defs>
  -o <filename>
  <files>

However, when I run strings <filename>, several class names show up, despite the -O4 in the command line. I’ve tried -Wl,-s which should tell llvm to strip all symbols, but that doesn’t remove these.

The class names that show up seem to all have one thing in common: they have a vtable. One of these classes is :

class MyClass {
public:
    virtual void myFunc() = 0;  
};

It shows up as the symbol :

N9namespace7MyClassE

I don’t like it that my namespace and class names show up in the final file. How do I strip these? My binary is a command line utility, so only the main function should be exported.


Even after supplying -fno-rtti (as suggested by @n.m.), some names still remain, such as :

__ZN15MyClassInstance6myFuncEv

(MyClassInstance being a subclass of the MyClass above)

Additionally, even the names of global variables are in the binary.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:38:38+00:00Added an answer on June 18, 2026 at 2:38 am

    I solved this by supplying the clang argument -fno-rtti, which disables RTTI, a C++ feature I don’t use anyway.

    [edit]
    It looks like -O4 does not imply strip, and the last few references to my class names can be removed by executing strip.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just trying to build an old project of mine using cuda 5.0 preview.
Im using ZURB Foundation 3 on a project of mine. I love grid systems
i'm trying to build an expandable slideshow for a project of mine, and i
I am trying to implement OpenSL ES into a project of mine, but while
Possible Duplicate: Java command line arguments. Using * as an argument for multiplication i
I noticed today that whenever I build a word add in project of mine,
I try to build project in Eclipse on Linux Ubuntu. Eclipse show error message:
I build my project with Gradle 1.0 and I use the EMMA plugin for
I build a project in C#. From another project I have 5 DLLs. Is
When I build my project to a Jar file with Ant, I generate javadoc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.