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 / Nautilus etc.)
If you get the error message "Couldn't find a compatible GRE.", see how the GRE is located in GRE Registration. If you are running the build from dist/bin, you can simply invoke it with "GRE_HOME=. ./run-mozilla.sh ./TestGtkEmbed"
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.
On Win32, I get a I get a dialog that says "The procedure entry point SEC_PKCS7CopyContentInfo could not be located in the dynamic link library smime3.dll"
This is related to a problem in the mozilla build faq. The solution is to look for the file nss3.dll in WINHOME/system32. Move aside or remove all files with the same modification date and time as that file.