Re: [anjuta-list] Couple of problems with Anjuta



Sebastien,

On Sat, Feb 27, 2016 at 10:04 AM, Igor Korot <ikorot01 gmail com> wrote:
Hi, Sebastien,

On Sat, Feb 27, 2016 at 9:44 AM, Sébastien Granjoux <seb sfo free fr> wrote:
Hi Igor,


Le 27/02/2016 15:09, Igor Korot a écrit :

Why don't you install it?

First of all I'm compiling against GTK2 and GTK3. Second, I will
compile master again in a couple of weeks/month - why install it?


I have understood that you want to use WxWidgets not just Gtk2 or Gtk3, so
you need to have WxWidget normally installed.

You probably misunderstood my comment.
My wxWidgets is compiled in 2 different directories - one against GTK+2 and one
against GTK+3. So its like this:

wxWidgets -> GTK+2 build
wxWidgets -> GTK+3 build

And I want to switch between those different configuration. So in
essense I need the
configuration of the project to work.


It's quite possible that a program or a library doesn't work if it is not
installed. Typically because it tries to read data files which are copied
only during the install step but it can be more complex. So, I think it's
better that you install WxWidget normally especially when something is not
working.

For the quick test I can try to install wxWidgets GTK+2 build and try it
but I really prefer to work with the project configuration. Everything should
be configurable - otherwise it defeats the purpose of IDE.



"Clean" just erase the object file not the complete project. You can
erase
the build directory yourself.

Can you add the equivalent of "make distclean" which will get rid of
everything
inside the build directory?


I think Build->Remove Configuration do that. Then you can force the
configure step to be run again, by checking regenerate when you build the
project.


OK. Basically I tried to change the properties of every single entity
in the project window but without success. I guess I will not be able
to override the default settings of the project.


Here, I can change the Compile flags in the GUI by changing the property 'C
preprocessor flags' of the program or the library. When I do that Anjuta
writes in the corresponding Makefile.am, a variable named
_program_or_library_name__CFLAGS = _value_of_the_property_.
Can you check that Anjuta do that in your Makefile.am?

Let's say my project is called test.
So in the project window I have:

Root branch called "test".
Under it I have 2 branches: po and src - I set up project to have
internationalization.
Under the src branch I have a branch called test.
Under the branch called test I have my source and header files.

So for which branch of the project tree I should change the properties?
I'm asking because I can do that for all branches: root, src and test.

I just tried to test this by changing the root item in  the project tree.

Here is what I did:
I ran "Build->Clean Project" (this did clean up the Debug folder, thank you).
Next, I changed the C++ and linker flags as appropriate and then run
"Build->Build Project".

It generated Makefile.am in the ~/test and ~/test/src.

Here they are (they are small so I can post them here):

From test/src/Makefile.am:

## Process this file with automake to produce Makefile.in

## Created by Anjuta

AM_CPPFLAGS = \
    $(WX_CXXFLAGS) \
    -DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
    -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
    -DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\"

AM_CFLAGS =\
     -Wall \
     -g \
     $(WX_CPPFLAGS)

bin_PROGRAMS = dbhandler

test_SOURCES =  \
    doc.cpp \
    doc.h \
    docview.cpp \
    docview.h \
    mainframe.cpp \
    mainframe.h \
    view.cpp \
    view.h \
    viewbase.cpp \
    viewbase.h

test_LDADD = \
     \
    $(WX_LIBS)

From ~/test/Makefile.am:

## Process this file with automake to produce Makefile.in
## Created by Anjuta

SUBDIRS = src po

dist_doc_DATA = \
    README \
    COPYING \
    AUTHORS \
    ChangeLog \
    INSTALL \
    NEWS


INTLTOOL_FILES = intltool-extract.in \
    intltool-merge.in \
    intltool-update.in

EXTRA_DIST = \
    $(INTLTOOL_FILES)

AM_CXXFLAGS = -I/home/igor/wxWidgets/buildGTK/lib/wx/include/gtk2-unicode-3.1 \
    -I/home/igor/wxWidgets/include \
    -D_FILE_OFFSET_BITS=64 \
    -DWXUSINGDLL \
    -D__WXGTK__ \
    -pthread

AM_LDFLAGS = -L/home/igor/wxWidgets/buildGTK/lib \
    -pthread \
    -Wl,-rpath,/home/igor/wxWidgets/buildGTK/lib \
    -lwx_gtk2u_xrc-3.1 \
    -lwx_gtk2u_html-3.1 \
    -lwx_gtk2u_qa-3.1 \
    -lwx_gtk2u_adv-3.1 \
    -lwx_gtk2u_core-3.1 \
    -lwx_baseu_xml-3.1 \
    -lwx_baseu_net-3.1 \
    -lwx_baseu-3.1

DISTCLEANFILES = intltool-extract \
    intltool-merge \
    intltool-update \
    po/.intltool-merge-cache


# Remove doc directory on uninstall
uninstall-local:
    -rm -r $(docdir)

Now the values of ~/test/Makefile.am -> AM_CXXFLAGS and AM_LDFLAGS are
correct. That's
what I used for the "Project Properties" dialog.
However it looks like those values are not played as the compilation
is using AM_CPPFLAGS.

Unfortunately the actual Makefile in ~/test/Debug is huge and I don't
want to paste it here.

Hopefully this will help with fixing the wxWidgets template in Anjuta.

Thank you for looking into this.




Regards,

Sébastien

Thank you.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]