Section 4: Common Problems
TestGTKEmbed doesn't work!
Did you invoke it like this "./run-mozilla.sh ./TestGtkEmbed"? This script ensures the dynamic library paths are correct so that TestGtkEmbed can be loaded properly. Running TestGTKEmbed directly may result in the wrong Mozilla libs being picked up if you have other versions elsewhere (e.g. installed by Galeon / Nautlius etc.)
How do I build MFCEmbed?
By building Mozilla as per normal, ensuring not to specify the --disable-tests argument. The MS DevStudio mfcembed.dsp to be found in the mfcembed directory is for editing purposes only.
How do I debug MFCEmbed?
Two ways, either by using the mfcembed.dsp project file, or from a blank project in DevStudio. Obviously both are only useful if mfcembed & Gecko have been built with debugging enabled.
The mfcembed.dsp file is currently set up for editing purposes only. If you want to debug using mfcembed.dsp, you must open up the "Project | Settings..". menu and select Debug properties panel from the settings dialog. Provide the full path to the mfcembed.exe as it was built with the rest of Mozilla. e.g. c:\moz\mozilla\dist\bin\mfcembed.exe. It should then be possible to debug it.
Alternatively, open up a fresh Devstudio and drag and drop the mfcembed.exe from Mozilla dist onto it. Devstudio 7 doesn't allow you to drag and drop executables like this so you must manually open it using the file menu.
Most of the Gecko libraries are loaded dynamically at startup, so if you want to set breakpoints on them in Devstudio 6 you must select the Additional DLLs category in the Debug panel and add any DLLs you intend to put breakpoints on. Devstudio 7 manages to figure out the breakpoints automatically.
Why won't FTP work?
Make sure you are including the "necko2" DLL and XPT files. If you are able to download ftp files, but cannot show directories, you may be using the wrong FTP directory view. There are two different views to display FTP directories. One of these views is XUL-based and requires the "appcomps" DLL. The other view is HTML-based and requires only the necko2 DLL. The
network.dir.generate_html preference will make mozilla use HTML mode.
Why is my build so huge?!
Mozilla does not use C++ exceptions, nor does it use run-time-type-info (RTTI). Building mozilla w/ these two options enabled on Linux using gcc 2.95.2, increases disk footprint by ~11Mb in a typical embedding scenario (exceptions taking up at least 90% of that added bloat). We strongly discourage the use of exceptions and RTTI. There is a bug in gcc for Linux that forces (you can't link w/ mozilla core) you to build mozilla w/ RTTI enabled if you are using exceptions in your code.