0

In the num.c file, the only code is

__attribute__((dllexport)) int num(void) { return 42; }

Then execute clang num.c -shared -o num.dll in the command prompt, The compiled product num.dll has 89kb

Obviously, the part of the code is very small :

What are the parts of the dll?

On Windows 10, clang 13.

Jabberwocky
  • 48,281
  • 17
  • 65
  • 115
user10339780
  • 953
  • 7
  • 13
  • 1
    Use your web research capabilities to find resources that explain in detail what a DLL contains. In the course you will stumble over tools that let you "look into" a DLL. And Clang's documentation tells you additionally, how to generate for example a map file that lists the "components" of the produced DLL. – the busybee Dec 03 '21 at 10:12
  • I can’t find relevant information in my native language. My English is not good, so it is more difficult to read the Clang document. Can you tell me where I am in the document? – user10339780 Dec 05 '21 at 15:19
  • Well, all relevant CS information is in English. I'm afraid that you need to learn to read it. You don't need to listen or speak it, though. If you want to ask others, you need at least rudimentary writing skills. -- I know this is hard. But there is no work around. Automatic translators can help to some degree. -- Since clang's linker has the same command line interface as GNU's linker, you can find there the option `-Wl,-Map,output.map`. – the busybee Dec 05 '21 at 16:52

0 Answers0