Guys,

  I'm having a hard time trying to have Gecko embedded in a Windows
application without using VC++.

The development host is a linux machine, where MingW is running
smoothly
(already compiled a lot of Win32 apps on it, with no fuss), so I guess
the
compiler itself is not to blame.

here's the mozconfig file I'm using:


  mk_add_options MOZ_CO_PROJECT=browser

  ac_add_options --target=i686-pc-mingw32
  ac_add_options --enable-win32-target=WIN95
  ac_add_options --enable-application=browser
  ac_add_options --enable-default-toolkit=windows
  ac_add_options --disable-accessibility
  ac_add_options --disable-activex
  ac_add_options --disable-shared
  ac_add_options --disable-updater
  ac_add_options --enable-static
  ac_add_options --with-system-nspr
  ac_add_options --with-nspr-prefix=/opt/Mozilla/nspr-4.6.1
  ac_add_options --without-system-zlib
  ac_add_options --without-system-jpeg
  ac_add_options --without-system-png
  ac_add_options --without-system-mng

  CROSS_COMPILE=1
  CC=i686-pc-mingw32-gcc
  CXX=i686-pc-mingw32-g++
  CPP=i686-pc-mingw32-cpp
  AS=i686-pc-mingw32-as
  LD=i686-pc-mingw32-ld


As you can see, the nspr-related bits caused me some trouble, so I
downloaded a pre-compiled distribution from there:

ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.6.1/WINNT5.0_OPT.OBJ/

.. then I installed it in /opt/Mozilla, and set the relevant configure
options in the mozconfig file.

Everything goes well (it seems) until I get to the XPCOM part.  Then
for
some reason, the host compiler is used instead of the target compiler:

gcc -o host_xpt_arena.o -c -DXP_UNIX -O3  -DEXPORT_XPT_API
-DMDCPUCFG=\"md/_linux.cfg\"   -I../../../../dist/include/xpcom -I../
../../../dist/include -I/opt/Mozilla/nspr-4.6.1/include
-I../../../../dist/sdk/include
/home/oprs/build/mozilla-win32/mozilla/xpcom/typelib/xpt/src/xpt_arena.c

Then, gcc fails on a __declspec(dllimport) in xpt_arena.h, since it's
using
the linux include files, which don't have a clue about what a dll is.

../../../../dist/include/xpcom/xpt_arena.h: In function `__declspec':
../../../../dist/include/xpcom/xpt_arena.h:81: error: syntax error
before
"__declspec"
In file included
from
/home/oprs/Gold-Cash/Mozilla/mozilla-win32/mozilla/xpcom/typelib/xpt/src/xpt_arena.c:47:
/usr/include/string.h:40: error: storage class specified for parameter
`memcpy'
/usr/include/string.h:44: error: storage class specified for parameter
`memmove'


Now, I guess there is a way around this (like having XPCOM to use the
right
compiler), but I must admit I don't feel really confident with this..


So my question is: has anybody ever succeeded in cross-compiling the
Mozilla
tree from Linux to a Windows target ?  I was hoping to find a packaged
XPCOM distribution somewhere, but I guess that was a bit optimistic.

Any hint would be much appreciated..


  regards,
    -Olivier.

_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to