delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/04/25/18:34:43

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Fri, 25 Apr 2003 18:34:30 -0400
From: Lester Ingber <ingber AT ingber DOT com>
To: cygwin AT cygwin DOT com
Subject: Cygwin DLLs support COM & OLE?
Message-ID: <20030425183430.A93067@ingber.com>
Reply-To: Lester Ingber <ingber AT ingber DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5.1i
X-URL-ALT: http://www.alumni.caltech.edu/~ingber/

I'm able to compile DLLs using

set module = mydll
gcc -mrtd -c ${module}.c
set old_lib = ${module}.o
set dependency_libs = '-lm'
gcc -mrtd -shared -mno-cygwin -o ${module}.dll \
    -Wl,--out-implib=lib${module}.a \
    -Wl,--export-all-symbols \
    -Wl,--export-dynamic \
    -Wl,--add-stdcall-alias \
    -Wl,--enable-auto-import \
    -Wl,--output-def=${module}.def \
    -Wl,--whole-archive ${old_lib} \
    -Wl,--no-whole-archive ${dependency_libs}
gcc -mrtd -mno-cygwin -O -o run_main main.c -L./ -l${module} ${dependency_libs}
./run_main

In answering my query to using such DLLs on TradeStation 7 (TS7, their
new product), one of their developers replied:

	There are two issues that must be resolved before you can use
	the new COM based SDK. (1) You must be able to create a Windows
	compatible "stdcall" DLL, and ( 2 ) your compiler must be able
	to support certain COM protocols, specifically OLE automation.

	The legacy SDK documented in the EasyLanguage Reference Guide
	( downloadable ) may be more suitable if your compiler does not
	support COM.

I believe that the -mrtd option takes care of point (1) above.

Wrt to point (2), is anyone familiar with these particular TS7 COM and
OLE issues, and should my script above for constructing DLLs be sufficient
for "vanilla C" code (runs across many platforms which I've tested)?

Thanks.

Lester

-- 
 Prof. Lester Ingber  ingber AT ingber DOT com  ingber AT alumni DOT caltech DOT edu
 www.ingber.com                     www.alumni.caltech.edu/~ingber

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

- Raw text -


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