Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <1d7bdfaa04120723007dda7d32@mail.gmail.com> Date: Wed, 8 Dec 2004 17:00:43 +1000 From: Robert McLeay Reply-To: robert AT fearthecow DOT net To: cygwin AT cygwin DOT com Subject: Re: Suppressing linking errors with GCC/G++/ld under Cygwin In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <1d7bdfaa04120618524bec0978 AT mail DOT gmail DOT com> Hi again, Thanks very much for your help. I've been working on this some more, and I think that the first solution is the better one. The follow is executed, (excerpt from make's output) with the following errors too. echo EXPORTS > qa.def nm code_block.o qa.o qa_options.o | grep '^........ [T] _' | sed 's/[^_]*_//' | sort >> qa.def ld --base-file qa.base -o qa.exe code_block.o qa.o qa_options.o -L/opt/local/gnu/lib ld: warning: cannot find entry symbol _mainCRTStartup; defaulting to 00401000 code_block.o(.text+0xa6):code_block.cc: undefined reference to `std::basic_ostream.... I know that there's something that I'm overlooking (most likely really basic and silly to miss), but after staring at all this compiler output, I swear that my brain has been fried. :) From the Makefile, the full commands that I am attempting to use are: # Export symbols echo EXPORTS > $(COMMAND.qa).def nm $(OBJECTS.qa) | grep '^........ [T] _' | sed 's/[^_]*_//' | sort >> $(COMMAND.qa).def # Link the DLL ld --base-file $(COMMAND.qa).base -o $(COMMAND.qa).exe $(OBJECTS.qa) -L/opt/local/gnu/lib $(EXTRALIBS) $(LDFLAGS) dlltool --as=as --dllname $(COMMAND.qa).exe --def $(COMMAND.qa).def --base-file $(COMMAND.qa).base --output-exp $(COMMAND.qa).exp ld --base-file $(COMMAND.qa).base $(COMMAND.qa).exp -o $(COMMAND.qa).exe $(OBJECTS.qa) $(BIG_LIBRARY) $(EXTRALIBS) $(LDFLAGS) dlltool --as=as --dllname $(COMMAND.qa).exe --def $(COMMAND.qa).def --base-file $(COMMAND.qa).base --output-exp $(COMMAND.qa).exp ld $(COMMAND.qa).exp -o $(COMMAND.qa).exe $(OBJECTS.qa) $(BIG_LIBRARY) $(EXTRALIBS) $(LDFLAGS) #Build the .a lib to link to dlltool --as=as --dllname $(COMMAND.qa).exe --def $(COMMAND.qa).def --output-lib lib$(COMMAND.qa).a It's a real pity that the switch -Wl,--out-implib,[name].a doesn't work. All the same, thanks a heap to all the Cygwin developers - even though I've run into problems like this, I'd be having a far worse time without it. Regards, Robert. -- 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/