That did the trick, thanks! On Sun, May 15, 2011 at 12:41 PM, grischka <[email protected]> wrote: > Ben Sprinkle wrote: >> >> Hello, I am trying to compile a simple little dll that doesn't do >> anything at the moment, I do not wish to link against the crt for this >> particular project. My code consists of this: >> >> int __dllstart(void *base, unsigned long reason, void *reserved) >> { >> return 1; >> } >> > > Yes, this is ... wrong. From win32/lib/dllcrt1.c: > > BOOL WINAPI _dllstart(HANDLE hDll, DWORD dwReason, LPVOID lpReserved) > > where WINAPI means __stdcall which means __attribute__((__stdcall__)). > > --- grischka > >> When attempting to compile with: >> >> tcc -Wall -shared -nostdlib prog.c >> >> It's giving me a __dllstart@12 not defined error, If I attempt to do >> the non-dll way of things using _start, it works fine. I have also >> tried naming it _dllstart and ___dllstart. I am pretty new to tcc, any >> help would be much appreciated! >> >> Thanks in advance. > > > _______________________________________________ > Tinycc-devel mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/tinycc-devel >
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
