[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Sugggestion: Add lib type *.c fortcc_add_library() on
From: |
lifenjoiner |
Subject: |
Re: [Tinycc-devel] Sugggestion: Add lib type *.c fortcc_add_library() on windows ('-l' option parse) |
Date: |
Wed, 18 Jun 2014 20:59:13 +0800 |
> > With this patch, we won't need to make the "libname".a library, and
> > also can use -l option. It will search for the *.def file, if succeed
> > it will do an extra search for the *.c file.
>
> And what if "dllname.c" is the source of "dllname.dll" as it much
> more likely happens in peoples' projects?
You are right. I missed this case as my projects are always small. Considering
this, it needs a double check for non-dynamic linking. I'm considering how to
do it. Then it will be just an optional usage, and the original usage will not
be effected.
>
> Then your patch would load both the dll and its source, causing
> strange behavior that people cannot explain, due to a side-effect
> from a "feature" that isn't documented anywhere.
>
> As to the other part - searching ".c" as library: If you think
> that is useful then why is it for windows users only? And how are
> people supposed to benefit if it is not documented?
In tcc_add_library(), other platforms except windows, the libs searching list
shows:
const char *libs[] = { "%s/lib%s.so", "%s/lib%s.a", NULL };
No *.def files to be used.
I work only on windows.
Sorry not document it, and too nervous to wait a so long time to get a valuable
opinion, I committed my patch.
>
> > I use my patched version all the time. It works well.
>
> Fine, great. But do we really need this in everybody's public
> "mob" version? :P
>
> --- grischka