gcc links to libcmain when generating a dll
skidmarks
home@slipbits.com
Fri May 23 13:49:06 GMT 2025
Thanks.
Just downloaded all the documents (the easy part), now comes the reading.
art
On 5/23/2025 6:40 AM, Jon Turney wrote:
> On 23/05/2025 14:30, skidmarks via Cygwin wrote:
> [...]
>> Thanks!
>>>>> g++ -shared -flinker-output=dyn -o slip.dll *.o
>>>> ran with not errors.
>>>> Is there any documentation available on cygwin specific issues?
>> This seems like a question that I should be able to answer on my
>> own.
>> Indeed. We do ask people to read the FAQ before posting, and:
>> https://cygwin.com/faq.html#faq.programming.dll-building
>> points to
>> https://cygwin.com/cygwin-ug-net/dll.html
>> which is in need of updating, but mentions that you should use '-shared'.
>> But this isn't actually a Cygwin specific question. '-shared' is
> actually the right flag to use everywhere.
>> > One residual question that a cygwin specific manual may answer> is
> why libcmain.a was included at all.
>> Because the linker thinks you are making an executable, which has to
> have a main function.
More information about the Cygwin
mailing list