diff –git a/giscanner/ccompiler.py b/giscanner/ccompiler.py index 1c66aac..e922feb 100644 — a/giscanner/ccompiler.py +++ b/giscanner/ccompiler.py @@ -137,17 +137,16 @@ class CCompiler(object):

is_msvc = False
libtool = utils.get_libtool_command(options)
if libtool:

+ args.extend([compiler_cmd.replace('gcc', 'dlltool'), '–identify'])

proc = subprocess.Popen([compiler_cmd, '-print-search-dirs'],
                        stdout=subprocess.PIPE)
o, e = proc.communicate()
for line in o.splitlines():
    if line.startswith('libraries: '):
        libsearch = line[len('libraries: '):].split(';')

+ libsearch = options.library_paths + libsearch

shlibs = []
not_resolved = []

diff –git a/giscanner/dumper.py b/giscanner/dumper.py index 45a09fc..3c70be6 100644 — a/giscanner/dumper.py +++ b/giscanner/dumper.py @@ -160,6 +160,7 @@ class DumpCompiler(object):

else:
    o_path = self._generate_tempfile(tmpdir, '.o')

+ os.name = 'nt'

if os.name == 'nt':
    ext = '.exe'
else:

@@ -263,10 +264,7 @@ class DumpCompiler(object):

else:
    args.extend(['-o', output])
if libtool:

+ args.append('-export-dynamic')

cppflags = os.environ.get('CPPFLAGS', '')
for cppflag in cppflags.split():