tinycc-devel
[Top][All Lists]
Advanced

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

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


From: Ben Sprinkle
Subject: Re: [Tinycc-devel] address@hidden not defined -- help!
Date: Sun, 15 May 2011 13:12:26 -0400

That did the trick, thanks!

On Sun, May 15, 2011 at 12:41 PM, grischka <address@hidden> 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 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.
>
>
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>



reply via email to

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