| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| From: | "Harold Mills" <harold DOT mills AT novaspeech DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | Re: dll link error using Cygwin gcc |
| Date: | Wed, 13 Jun 2007 14:45:29 -0400 |
| Message-ID: | <000001c7adeb$04468a00$0cd39e00$@mills@novaspeech.com> |
| MIME-Version: | 1.0 |
| X-Mailer: | Microsoft Office Outlook 12.0 |
| x-cr-hashedpuzzle: | AMas Bo7m Cnks DSdw D4+y EbHW F2vQ F5Nu GNHe HTyB ICz7 I0mt Jxmk KoLX Lo0W NFQs;1;YwB5AGcAdwBpAG4AQABjAHkAZwB3AGkAbgAuAGMAbwBtAA==;Sosha1_v1;7;{DFBD246D-117B-4CF7-A65F-0CC2DC481E3C};aABhAHIAbwBsAGQALgBtAGkAbABsAHMAQABuAG8AdgBhAHMAcABlAGUAYwBoAC4AYwBvAG0A;Wed, 13 Jun 2007 18:45:26 GMT;UgBlADoAIABkAGwAbAAgAGwAaQBuAGsAIABlAHIAcgBvAHIAIAB1AHMAaQBuAGcAIABDAHkAZwB3AGkAbgAgAGcAYwBjAA== |
| x-cr-puzzleid: | {DFBD246D-117B-4CF7-A65F-0CC2DC481E3C} |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
As Dave Korn and Brian Dessent both pointed out, my problem was that gcc was
compiling Hello.c with the default cdecl calling convention, but the library
I wanted to link to uses the stdcall convention. Adding __stdcall to the
function declarations in the header file eci.h fixed the problem. Dave
suggested using the --enable-stdcall-fixup link option, which from the ld
documentation did seem like it would do the trick, but I couldn't get it to
work. I specified it to gcc as -Wl,--enable-stdcall-fixup, but still got the
"undefined reference" error message.
Cheers,
Harold Mills
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |