delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/01/01:55:46

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: Sat, 01 Feb 2003 01:56:08 -0500
From: Paul Kienzle <pkienzle AT users DOT sourceforge DOT net>
Subject: system() error for each LoadLibrary() dll
To: cygwin AT cygwin DOT com
Message-id: <3E3B6F88.6080002@users.sf.net>
MIME-version: 1.0
X-Accept-Language: en-us, en
User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3a) Gecko/20021212

Hi,

I'm trying to debug a problem with Octave running under
Cygwin for Windows ME.

Every time I fork, I get a message box for each dynamically
loaded dll saying:
    Octave has caused an error in SUB.DLL
    Octave will now close.
This does not happen in Windows 2000.

In trying to locate the problem, I've removed all octave
specific code.  The problem occurs if I link against one
of the three octave libraries (liboctinterp) but not if I
link against the other two.  Again, I am not using any
symbols from octave, so it is something in the dll
initialization code which is causing the problem.

Any suggestions what sort of code to look for?

Or do I have to start chopping bits out of liboctinterp
at random until the program stops breaking?

Thanks in advance,

Paul Kienzle
pkienzle AT users DOT sf DOT net

PS, I'm including my test code here, but you won't be
able to use it without liboctinterp and their dependencies. 
These are rather large (~5.4 Mb compressed), so I've
put them at

    http://mywebpages.comcast.net/pkienzle/octave.html

--- dynmain.cc:
#include <iostream>
#include <windows.h>
int main(int argc, char *argv[])
{
  HINSTANCE handle = LoadLibrary("dynsub.dll");
  std::cout << "# Calling system\n";
  system("ls");
  std::cout << "# continuing\n";
  return 0;
}

--- dynsub.c:
#include <stdio.h>
void dynsub(void) { printf("in dynsub\n"); }

--- Makefile:
all: dynsub.dll dynmain.exe dynerr.exe
dynmain.exe: dynmain.o  ; g++ -o $@ $<
dynerr.exe : dynmain.o  ; g++ -o $@ $< liboctinterp.dll.a
dynmain.o  : dynmain.cc ; g++ -c dynmain.cc
dynsub.dll : dynsub.o   ; gcc -shared dynsub.c -o dynsub.dll



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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