| I've always defined with exactly the same signature that I declared.
Original Message:
-----------------
From: ramsdell@mitre.org (John D. Ramsdell)
Date: 15 Dec 2003 19:38:46 -0500
To: csound-dev@eartha.mills.edu
Subject: [CSOUND-DEV:3774] Re: DLLs on Cygwin
Antoine Lefebvre writes:
> I did compile csound 4 with ./configure --enable-shared and it seems that
i
> don't get the error you are talking about. When done with compilation, i
have
> cygcsound-0.dll in my .libs directory
This is definitely something I don't achieve. Something must be
broken in my installation, I guess.
> The only problem that i get is when creating the executable
>
> make[2]: Entering directory `/home/antoine/csound/csound'
> /bin/bash ../libtool --mode=link gcc -g -O2 -Wall -falign-loops=4
> -falign-jumps
> =4 -ffast-math -fomit-frame-pointer -finline-functions -funroll-loops -o
> csoun
> d.exe ccsound.o libcsound.la -lwinmm
> gcc -g -O2 -Wall -falign-loops=4 -falign-jumps=4 -ffast-math
> -fomit-frame-pointe
> r -finline-functions -funroll-loops -o .libs/csound.exe ccsound.o
> ./.libs/libcs
> ound.dll.a -lwinmm -Wl,--rpath -Wl,/usr/local/lib
> ccsound.o(.text+0x23): In function `main':
> /home/antoine/csound/csound/ccsound.c:9: undefined reference to
> `_csoundCreate'
> ccsound.o(.text+0x3b):/home/antoine/csound/csound/ccsound.c:10: undefined
> refere
> nce to `_csoundPerform'
> ccsound.o(.text+0x45):/home/antoine/csound/csound/ccsound.c:11: undefined
> refere
> nce to `_csoundCleanup'
> ccsound.o(.text+0x4d):/home/antoine/csound/csound/ccsound.c:12: undefined
> refere
> nce to `_csoundReset'
> ccsound.o(.text+0x55):/home/antoine/csound/csound/ccsound.c:13: undefined
> refere
> nce to `_csoundDestroy'
> collect2: ld returned 1 exit status
> make[2]: *** [csound.exe] Error 1
> make[2]: Leaving directory `/home/antoine/csound/csound'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/antoine/csound/csound'
Well, this will not do. The ccsound object file never found the
symbols it was looking for from the DLL. Perhaps I exported symbols
incorectly. Please look at csound/csound.c and csound/csound.h. I
added PUBLIC to both the declaration and definition of exported
symbols.
In the header I wrote:
PUBLIC void* csoundCreate(void *);
Was I supposed to write:
void* csoundCreate(void *) PUBLIC;
In the C source I wrote:
PUBLIC void* csoundCreate(void * data)
{
...
}
Do definitions require PUBLIC?
John
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ . |