libtool
[Top][All Lists]
Advanced

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

Using DLLs created by libtool in MSVC?


From: Hugo Sanchez
Subject: Using DLLs created by libtool in MSVC?
Date: Sun, 12 Jul 2009 23:31:33 +0700

Hi everyone,

Basically, I cross-compiled a .dll library with the build machine was i686-pc-linux-gnu and the host machine was i586-mingw32msvc. The process seemed to be successful. The output files were a .dll library and an import library ( a .dll.a file).

I managed to explicitly link the .dll library to a C application in MSVC (I am using Microsoft Visual Studio 2008). I mean I managed to call and use the .dll library using functions like LoadLibrary and GetProcAddress.

However, I could not implicitly link the .dll library in MSVC. Briefly, what I did were:
- Rename the import library's extension from .dll.a to .lib, so that it is compatible with MSVC.
- Copy both the .dll (the shared library) and the .lib (the import library) to the MSVC project folder.
- Link the .lib import library to the MSVC project so that a .c file can call functions exported from the .dll library.
But when I built the project I got a warning: "warning LNK4078: multiple '.text' sections found with different attributes (E0000020)" and when I ran the exe file it just closed without doing anything. I don't know what's wrong here.

Could you please help my to find out the problem?

Thanks in advance!

Sanchez

reply via email to

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