History

tccpe: with -l try also with "lib" prefix

-lfoo searches: foo.def, libfoo.def, foo.dll, libfoo.dll

grischka committed 16 years ago

Commit 3020a471 parent 94bf4d21 file · +11 −8Browse files

Unified · Split

tccpe.c+11−8
@@ -1611,15 +1611,18 @@ PUB_FN int pe_load_file(struct TCCState *s1, const char *filename, int fd) · 1610 unmodified lines
1611 return ret;1611 return ret;
1612}1612}
1613 1613
1614int pe_add_dll(struct TCCState *s, const char *libraryname)1614int pe_add_dll(struct TCCState *s, const char *libname)
1615{1615{
1616 char buf[MAX_PATH];1616 static const char *pat[] = {
1617 snprintf(buf, sizeof(buf), "%s.def", libraryname);1617 "%s.def", "lib%s.def", "%s.dll", "lib%s.dll", NULL
1618 if (tcc_add_dll(s, buf, 0) == 0)1618 };
1619 return 0;1619 const char **p = pat;
1620 snprintf(buf, sizeof(buf), "%s.dll", libraryname);1620 do {
1621 if (tcc_add_dll(s, buf, 0) == 0)1621 char buf[MAX_PATH];
1622 return 0;1622 snprintf(buf, sizeof(buf), *p, libname);
1623 if (tcc_add_dll(s, buf, 0) == 0)
1624 return 0;
1625 } while (*++p);
1623 return -1;1626 return -1;
1624}1627}
1625 1628

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t