This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: .s file causing problems when linking


Nathan Thern wrote:

> That sounds great. However, I can't get it to work:
> "gcc -o scheme.exe *.o -Wl,--out-implib,scheme.dll.a" creates a
> working scheme.exe, but silently doesn't create scheme.dll.a
> and

For the last time, please read the link I gave.  Specifically this part:

>   However, keep in mind that the GNU linker's auto-export feature
> (which normally allows you to skip the practice of requiring
> __declspec(dllexport) when declaring symbols you want to export) does
> not apply when linking an executable.  Therefore, when linking an
> executable that exports symbols you need to do one of:
> 
> A) -Wl,--export-all-symbols
> B) declare the symbols to be exported with __declspec(dllexport)
> C) supply the .def file to the linker

> "gcc -shared -o scheme.exe *.o -Wl,--out-implib,scheme.dll.a" creates
> scheme.dll.a and creates a scheme.exe that dies with "-bash:
> scheme.exe: Permission denied" upon invocation.

-shared creates a dll.  You can't use that to link an executable.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]