delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/03/05/08:15:08

X-Spam-Check-By: sourceware.org
Message-ID: <4e41f5c20703050514g5f4f0d3dlf2b9a2d8f844018e@mail.gmail.com>
Date: Mon, 5 Mar 2007 06:14:31 -0700
From: "Morgan Gangwere" <0 DOT fractalus AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Going crazy trying to compile dll
In-Reply-To: <45EBEED3.6020908@alkit.se>
MIME-Version: 1.0
References: <45EBEED3 DOT 6020908 AT alkit DOT se>
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

On 3/5/07, Jonas Jalminger <jonas AT alkit DOT se> wrote:
> Hi,
>
> I have tries various solutions but nothing works. The problem is that
> dlopen() never returns when called.
> These are built in eclipse using managed projects where the dll is
> chosen as shared library project.
> If I misspell the dll-name, dlopen() returns as it should with an error
> saying "not found".
>
> Please, help!
>
> /Jonas
>
> My main program looks as follows:
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <dlfcn.h>
>
> #define PLUGINDIR "/plugins"
>
> int main(int argc, char **argv) {
>
>     void *fileHandle;
>     char path[] = "./plugins/simplelibrary.dll";
>     char ans[500];
>
>     fileHandle = dlopen(path, RTLD_GLOBAL);
>
>     if (fileHandle == NULL) {
>         strcpy(ans, dlerror());
>         printf("%s", ans);
>     }
>
>     return 0;
> }
>
> The dll code is:
> void konto(int japp) {
>
> }
>
> --
> 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/
>
>

is this a new thing for you? can you get a simple example? can you
place the library in the same dir?
read some example code and compile it and see what happens. if _that_
code works and _your_ code doesn't work, then you know its probably
you.

-- 
Morgan gangwere

"Space does not reflect society, it expresses it." -- Castells, M.,
Space of Flows, Space of Places: Materials for a Theory of Urbanism in
the Information Age, in The Cybercities Reader, S. Graham, Editor.
2004, Routledge: London. p. 82-93.

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