Re: [anjuta-list] How to: Configure multiple compile targets
- From: "Arnel A. Borja" <kyoushuu yahoo com>
- To: Sébastien Granjoux <seb sfo free fr>
- Cc: bsquared <bwcode4u gmail com>, anjuta-list gnome org
- Subject: Re: [anjuta-list] How to: Configure multiple compile targets
- Date: Thu, 25 Oct 2012 17:22:03 +0800
On Thursday, 25 October, 2012 03:09 AM, Sébastien Granjoux wrote:
Hi,
On 24/10/2012 06:16, Arnel A. Borja wrote:
On Monday, 22 October, 2012 10:29 PM, BSquared wrote:
I am looking for some documentation or guidance in setting up multiple
targets (ie. Linux, win32 and mac) in Anjuta. I believe I have to
provide separate PKG_CONFIG_PATH variables and toolchains.
Go to "Build -> Configure Project..." in the menu. Select one of the
configurations as sacrifice for Windows :D (I used Optimized).
In my idea, you shouldn't need to sacrifice one configuration for
Windows because the combo box should be editable. But I have just seen
that it doesn't work on the master. It's a bug, I will check why it
happens.
I was also surprised when I can't create a new one, since I sometimes do
that before. I'm currently using the latest stable release, 3.6.0.
In "Configure Options:", add "'PKG_CONFIG_LIBDIR='
'PKG_CONFIG_PATH=/home/kyoushuu/Devel/MinGW/lib/pkgconfig:/home/kyoushuu/Devel/MinGW/share/pkgconfig'
--build=x86_64-pc-linux-gnu --host=i686-w64-mingw32". Set appropriate
values for PKG_CONFIG_PATH, --build and --host. Make sure to add the
environment variables to "Configure Options" instead of "Environment
Variables"; otherwise your other configurations will be affected and
they will be all compile for Windows, "Environment Variables" are
global.
Do you think it makes more sense to have the environment variables
local to each configuration?
Yes, or at least make it look like "separated". The "Configuration:"
label is in bold font while the "Environment Variables:" label is under
it, making it look like they are local to each configuration.
In what commands are these environment variables are used? During
configuration and make commands? Does it include running?
I have never tried to compile a program for Windows from Anjuta, I
have thought that it is more complex and that we need a special plugin
for doing it. There was a scratchbox plugin but I'm not sure it is
still working.
What advantages do you see if we write a plugin for this?
I don't think we need a plugin for this; it is usually just adding some
environment variables and configure options, running the resulting
executable that have a ".exe" extension, then other things are just
same. We could just include a new default configuration for
cross-compilation, as an example probably.
Though it would be nice if the default project files (usually just the
configure.ac file and Makefile's) support Windows by default. Some
linker options and other things are necessary to be added to those files
to make applications compile and look native in Windows, like detecting
if we are compiling for native Windows (not a Unix emulation
environment, like Cygwin), adding -no-undefined to linker flags when
compiling for Windows, adding -mwindows if the target is a GUI
application and compiling for native Windows, adding Windows resources
for program icons, etc. You could check the sources of Glade and other
GNOME applications that support Windows for more example.
I actually don't use the defaults created by Anjuta when I create a new
project, since usually I need to compile for Windows; I just copy from
my other projects. With the same reason, I edit those files manually too.
Regards,
Sébastien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]