delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
connect(): | No such file or directory |
From: | Kurt Franke <Kurt-Franke AT web DOT de> |
Subject: | Re: Using main() from a shared library in Cygwin 1.7 |
Date: | Fri, 14 May 2010 12:13:11 +0000 (UTC) |
Lines: | 30 |
Message-ID: | <loom.20100514T140052-451@post.gmane.org> |
References: | <AANLkTimwNAqJBuPS6lvvx4SBdlTh49fDHvKtGfUjHQuk AT mail DOT gmail DOT com> |
Mime-Version: | 1.0 |
User-Agent: | Loom/3.14 (http://gmane.org/) |
X-IsSubscribed: | yes |
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 |
Ferenc Kovacs <derefer <at> gmail.com> writes: ... > I have an application, which links with a shared library (fairly common > situation :)). This shared library provides the main() function. This > approach works well on Linux/Solaris machines, but on Cygwin 1.7 > I get the following link error: ... Hi Ferenc, some years ago I had a problem with main function in a library under VMS The linker just didn't search for it in a library. To force it to search a reference in a non-library part of source did help. I just added the following code in the main source file: extern int main(); static int (*force_linker_search_for_main_in_library)() = main; maybe something similar will help you regards kf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |