delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/06/24/12:44:18

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.0 required=5.0 tests=BAYES_20,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_PASS,TW_GC,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <28984421.post@talk.nabble.com>
Date: Thu, 24 Jun 2010 09:44:03 -0700 (PDT)
From: surferbuddha <jahmail AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Using main() from a shared library in Cygwin 1.7
In-Reply-To: <loom.20100514T140052-451@post.gmane.org>
MIME-Version: 1.0
References: <AANLkTimwNAqJBuPS6lvvx4SBdlTh49fDHvKtGfUjHQuk AT mail DOT gmail DOT com> <loom DOT 20100514T140052-451 AT post DOT gmane DOT org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

Hi, 

Since I came across this searching for my issue I will post the solutions I
found to work:

gcj was not linking to main, receiving error:

/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../libcygwin.a(libcmain.o):

I found two solutions, one online and one in the gcj man page:

gcj --main=HelloWorldApp HelloWorldApp.java

gcj -lgij HelloWorldApp.java

both of these options correctly linked the library needed for main.

enjoy!

Elijah
-- 
View this message in context: http://old.nabble.com/Using-main%28%29-from-a-shared-library-in-Cygwin-1.7-tp28556897p28984421.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019