delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/05/09:49:29

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <00a201c0173f$eed35660$f7c723cb@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: <cygwin AT sources DOT redhat DOT com>
Subject: libtool
Date: Wed, 6 Sep 2000 00:47:00 +1100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300

I went and tried libtool after the post that libtool supported dll
creation...

I have a problem with the dll creation from libtool 1.3.4 and 1.3.5. I know
this isn't the libtool list.. but this is a cygwin specific issue..

I have applied the dll_entry patch for cygwin 1.1.4 (which I am running).

The error reported from make is:
---
 test -f .libs/libglib-1-2-0-0-8.dll-ltdll.o || (cd .libs && gcc -c
libglib-1-2-
0-0-8.dll-ltdll.c)
libglib-1-2-0-0-8.dll-ltdll.c:23: conflicting types for `DllMain'
libglib-1-2-0-0-8.dll-ltdll.c:16: previous declaration of `DllMain'
libglib-1-2-0-0-8.dll-ltdll.c:23: conflicting types for `_cygwin_dll_entry'
libglib-1-2-0-0-8.dll-ltdll.c:23: previous declaration of
`_cygwin_dll_entry'
libglib-1-2-0-0-8.dll-ltdll.c:30: conflicting types for `DllMain'
libglib-1-2-0-0-8.dll-ltdll.c:23: previous declaration of `DllMain'
---

libglib-1-2-0-0-8.dll-ltdll.c is as follows
---
/* ltdll.c starts here */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <stdio.h>
#
#ifndef __CYGWIN__
#  ifdef __CYGWIN32__
#    define __CYGWIN__ __CYGWIN32__
#  endif
#endif

#ifdef __cplusplus
extern "C" {
#endif
BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
#ifdef __cplusplus
}
#endif

#ifdef __CYGWIN__
#include <cygwin/cygwin_dll.h>
DECLARE_CYGWIN_DLL( DllMain );
#endif

HINSTANCE __hDllInstance_base;
#
BOOL APIENTRY
DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
{
  __hDllInstance_base = hInst;
  return TRUE;
}
/* ltdll.c ends here */
---

if I change the *ltdll.c file to
--
/* ltdll.c starts here */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <stdio.h>
#
#ifndef __CYGWIN__
#  ifdef __CYGWIN32__
#    define __CYGWIN__ __CYGWIN32__
#  endif
#endif
#ifndef __CYGWIN__
#ifdef __cplusplus
extern "C" {
#endif
BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
#ifdef __cplusplus
}
#endif
#else
#ifdef __CYGWIN__
#include <cygwin/cygwin_dll.h>
//DECLARE_CYGWIN_DLL( DllMain );
#endif
#endif
HINSTANCE __hDllInstance_base;
#
int  WINAPI
DllMain (HANDLE h, DWORD reason, void *ptr)
{
  __hDllInstance_base = h;
  return TRUE;
}
/* ltdll.c ends here */
--

it compiles the dll, .la, .lai files ok.
but.. I get a reports of syntax error in the def file, and application
compiled to use the library get undefined references to the functions in
it - which I thought libtool was meant to handle...


I'll happily go bug the libtool lists if that's appropriate..
Rob


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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