creating a .so with gdc

Carlos Santander csantander619 at gmail.com
Fri May 4 06:31:12 PDT 2007


Anders F Björklund escribió:
> Carlos Santander wrote:
> 
>> Can somebody explain for the n-th time how to create a .so with GDC? 
>> Here's what I'm getting:
>>
>> $ gdc -fshared -Wl,-soname,libfoo.so -o libfoo.so foo.o
>> /usr/bin/ld: unknown flag: -soname
>> collect2: ld returned 1 exit status
>>
>> That's on Mac OS X. How about also setting up a wiki page so it's easy 
>> to find?
> 
> I haven't created a shared library with GDC, but the shared (.so) files 
> on other platforms are known as either dynamiclib or bundle on Mac OS X.
> Dynamic libraries are for linking to and bundles for loading at runtime,
> for instance program plugins and modules for Perl or Python are bundles.
> 
> Using -soname should be equivalent to -install_name on Mac OS X. See:
> http://developer.apple.com/documentation/developertools/gcc-4.0.1/gcc/Darwin-Options.html 
> 
> $ gcc -dynamiclib -Wl,-install_name,libfoo.dylib -o libfoo.dylib foo.o
> But my GDC says cc1d: error: unrecognized command line option "-fshared"
> 
> --anders

Weird...

/usr/bin/ld: -i argument: nstall_name must have a ':' between its symbol names

-- 
Carlos Santander Bernal


More information about the Digitalmars-d-learn mailing list