[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-cross-env-list] New to mingw-cross-env: compilation error wit
Re: [Mingw-cross-env-list] New to mingw-cross-env: compilation error with undefined reference to `_XML_ParserCreate'
Sun, 14 Aug 2011 02:02:48 +1000
On 12 August 2011 23:48, Allen Choong <address@hidden> wrote:
> I am new to mingw-cross-env. I am using Arch Linux, and building my project
> with mingw-cross-env. My source code doesn't have any problem when building
> in Windows wing mingw32 and Linux, but when I build with mingw-cross-env,
> there are a lot "undefined reference" error.
> I am using the gtk2 for my project. The mingw-cross-env version I am using
> is the mecurial repository:
> The following are some of my errors:
> undefined reference to `_XML_ParserCreate'
> undefined reference to `_XML_SetUserData'
> undefined reference to `_XML_SetElementHandler'
> undefined reference to `_XML_SetCharacterDataHandler'
> undefined reference to `_gtk_window_get_type'
> undefined reference to `_g_type_check_instance_cast'
> undefined reference to `_gtk_dialog_new_with_buttons'
> undefined reference to `_gtk_widget_destroy'
> Please help.
It looks like you're not passing the required libs to gcc, somewhere
in your build scripts you'll need a line like:
i686-pc-mingw32-pkg-config gtk+-2.0 --cflags --libs
How are you building your project: using Makefiles, autotools, or
something else? Check step 5 of the tutorial:
for some common build systems, and take a look at the way the test
program is built using gcc & pkg-config, starting on line 46:
These should point you in the direction.