mingw-cross-env-list
[Top][All Lists]
Advanced

[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


From: Allen Choong
Subject: Re: [Mingw-cross-env-list] New to mingw-cross-env: compilation error with undefined reference to `_XML_ParserCreate'
Date: Sun, 14 Aug 2011 14:32:07 +0800

Thanks Tony, I already solve the problem. I am using autotools.
The problem is caused by the linking order, the compiled objects are after the LDFLAGS, so, I tried to put my original LDFLAGS to LDADD, so that the linking flags are after the objects.


> Date: Sun, 14 Aug 2011 02:02:48 +1000
> Subject: Re: [Mingw-cross-env-list] New to mingw-cross-env: compilation error with undefined reference to `_XML_ParserCreate'
> From: address@hidden
> To: address@hidden
> CC: address@hidden
>
> 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:
> > http://hg.savannah.nongnu.org/hgweb/mingw-cross-env/
> > 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.
>
>
> Hi Allen,
>
> 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:
>
> http://mingw-cross-env.nongnu.org/#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:
>
> http://hg.savannah.gnu.org/hgweb/mingw-cross-env/raw-file/dd957bc0a7f7/src/gtk2.mk
>
> These should point you in the direction.
>
> Cheers,
>
> Tony

reply via email to

[Prev in Thread] Current Thread [Next in Thread]