Re: Creating and using a .DLL/.SO?

new topic     » goto parent     » topic index » view thread      » older message » newer message
jeremy said...

For now (today, tomorrow, 4.0a3), wouldn't it be best to just fix the name mangling problem? <snip> When compiled to a .dll, produces a .dll that has the procedure "hello" exported. When compiled to a .so, produces a .so that has the procedure "_1hello" exported.

Jeremy

Both versions of the C source have it as _1hello. It is named _1hello in the translated C code regardless of platform.

The difference is, the Windows version writes out a .def file that exports _1hello as hello when we are compiling a dll. When compiling a shared object (.so) there is no exports file for Unix, so we are stuck with _1hello. This looks quite difficult to fix on the Unix side short of truly naming the object without the _1 prefix (but then doing this affects the Windows code).

See Write_def_file() in source/c_decl.e for the actual code.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu