Compilation problem with MinGW cross-compile

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compilation problem with MinGW cross-compile

Josh Heidenreich-2
Hi,

I am having a problem cross-compiling libconfuse 2.7 using MinGW on Linux.

The compilation works but not for shared libraries. I have attached
the output from the configure and make commands.

I get the following warning:
libtool: link: warning: undefined symbols not allowed in
i386-pc-mingw32 shared libraries

Any help will be appreciated,
Cheers,
Josh

_______________________________________________
Confuse-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/confuse-devel

configure.txt (7K) Download Attachment
make.txt (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Compilation problem with MinGW cross-compile

ohnobinki
On Mon, Jun 07, 2010 at 11:56:44PM +0930, Josh Heidenreich wrote:

> Hi,
>
> I am having a problem cross-compiling libconfuse 2.7 using MinGW on Linux.
>
> The compilation works but not for shared libraries. I have attached
> the output from the configure and make commands.
>
> I get the following warning:
> libtool: link: warning: undefined symbols not allowed in
> i386-pc-mingw32 shared libraries
I just made a commit to confuse's git repository which let me build a DLL using mingw32 and ./configure's cross-compilation support. However, I was unable to test if this DLL was actually useful or not, as I am not running Windows.

If you are interested in trying this out and testing this for me, please clone the repository following the instructions at http://savannah.nongnu.org/git/?group=confuse . Sorry for taking so long to reply ;-).

--
ohnobinki

Look out for missing apostrophes!

_______________________________________________
Confuse-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/confuse-devel

attachment0 (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Compilation problem with MinGW cross-compile

Carlo Marcelo Arenas Belon
On Tue, Jul 06, 2010 at 10:07:46PM -0400, Nathan Phillip Brink wrote:
> On Mon, Jun 07, 2010 at 11:56:44PM +0930, Josh Heidenreich wrote:
> >
> > I am having a problem cross-compiling libconfuse 2.7 using MinGW on Linux.
> >
> > The compilation works but not for shared libraries. I have attached
> > the output from the configure and make commands.

libconfuse doesn't enable shared libraries by default, and is therefore
better if linked statically anyway, dynamic libraries work though and
this case is just a sideffect of using a cross-compiler.

> > I get the following warning:
> > libtool: link: warning: undefined symbols not allowed in
> > i386-pc-mingw32 shared libraries
>
> I just made a commit to confuse's git repository which let me build a DLL using mingw32 and ./configure's cross-compilation support. However, I was unable to test if this DLL was actually useful or not, as I am not running Windows.

the resulting binary can work in linux too through wine, in this
case the ftpconf example is shown to work by (after building the
tree with --enable-shared):

  $ cd examples
  $ i686-pc-mingw32-gcc -I../src -O2 -L../src/.libs -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields ../src/.libs/libconfuse-0.dll ftpconf.c -o ftpconf.exe
  $ cp -a ../src/.libs/libcofuse-0.dll
  $ ./ftpconf.exe
  got alias 'ls' = 'ls -F'
  got alias 'll' = 'ls -lF'
  passive-mode = true
  remote-completion = false
  number of bookmarks: 2
    bookmark #1: anonymous:[hidden email]:21/pub/gnu
    bookmark #2: anonymous:anonymous@@ftp.kernel.org:8021/pub/linux/kernel/v2.6
  xterm-terminal #1: xterm
  xterm-terminal #2: rxvt
  xterm-terminal #3: xterm-debian
  auto-create-bookmark = 3
  $ file ftpconf.exe
  ftpconf.exe: PE32 executable for MS Windows (console) Intel 80386 32-bit
  $ objdump -x ftpconf.exe | grep "DLL Name"
        DLL Name: KERNEL32.dll
        DLL Name: msvcrt.dll
        DLL Name: libconfuse-0.dll

Carlo

PS. wincfgtest.c is an example for GUI which used to be working for 2.7
    and that was configured by default to use a DLL.

_______________________________________________
Confuse-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/confuse-devel