[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] address@hidden not defined -- help!

From: grischka
Subject: Re: [Tinycc-devel] address@hidden not defined -- help!
Date: Sun, 15 May 2011 18:41:41 +0200
User-agent: Thunderbird (Windows/20100228)

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 address@hidden 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]