Cross-compilation

51 views
Skip to first unread message

Roberto DMD

unread,
Jul 4, 2011, 8:30:37 PM7/4/11
to pkg-config-support-for-eclipse-cdt
Hi,

First of all: Thank you very much for your plugin.

I compile Windows programs on Linux using Eclipse, and I've noticed
that your plugin doesn't call the right pkg-config binary when I setup
a CDT cross-compile project. I think there should be an option to
select the PATH of the pkg-config tool. For example, in my particular
case, I would like the pkg-config binary to be called as /opt/mingw/
usr/bin/i686-pc-mingw32-pkg-config.

Do you think that is easy to accomplish ? You could read the toolchain
prefix (i.e i686-pc-mingw32-) and the toolchain PATH that is setup
when a new Cross GCC project is created, OR simply add an option to
specify the pkg-config binary in the plugin preferences, but I think
the former way is better because you have a single place where the
toolchain prefix and path are specified.

Thank you very much,

Robert.

Petri Tuononen

unread,
Jul 5, 2011, 4:33:05 AM7/5/11
to pkg-config-suppor...@googlegroups.com
Hi,

Have you tried the Pkg-config preference page (Window -> Preferences ->
Pkg-config) and setting the path manually from there? You need to
restart the workspace in order it to take an effect.

BR,
Petri

Roberto DMD

unread,
Jul 5, 2011, 10:06:00 AM7/5/11
to pkg-config-support-for-eclipse-cdt
Hi,

Yes, I've tried to set PKG_CONFIG_LIBDIR to the cross compiler pkg-
config library directory (i.e /opt/mingw/usr/i686-pc-mingw/lib/
pkgconfig) but it doesn't work, because when I invoke the compiler,
pkg-config uses the system pkg-config library directory (/usr/lib/
pkgconfig). Also, the list of packages shown by the plugin, is take
from /usr/lib/pkgconfig instead of /opt/mingw/usr/i686-pc-mingw/lib/
pkgconfig.

Robert.

Petri Tuononen

unread,
Jul 5, 2011, 11:16:56 AM7/5/11
to pkg-config-suppor...@googlegroups.com
Hi,

Ok, good to know. Sure it seems like the preference page values will not
override pkg-config system environment variable path. I will take a look
when I can.

Petri

Reply all
Reply to author
Forward
0 new messages