Re: Feedback on my Win32 GTK+ Experience

2007-11-25 Thread Micah Carrick
Thank you for your response. It is very helpful.

- Micah Carrick

  Developer - http://www.micahcarrick.com
  GTK+ Forums - http://www.gtkforums.com



Tor Lillqvist wrote:
>> 1. libxml-2.0 from libxml2-2.6.30.win32.zip was missing the .pc file for 
>> pkg-config.
>> 
>
> I guess libxml2-2.6.30.win32.zip is the one on
> http://xmlsoft.org/sources/win32/ ? Please ask Igor Zlatkovic to
> include also the .pc file in his packages.
>
> http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/libxml2-dev-2.6.27.zip
> (which is simply a slight repackaging by me of what Igor provides)
> does include the .pc file.
>
>   
>> I simply found this file in the sources elsewhere and copied
>> to C:\MinGW\lib\pkgconfig\libxml-2.0.pc. Is this normal?
>> 
>
> Yes and no. If you have the rest of libxml2 under c:\mingw, then it is
> the right thing to do.
>
> My personal preference is not to mix stuff from different sources. I
> keep only stuff from www.mingw.org in my mingw folder, and then I have
> a separate folder for stuff from gnuwin32.sourceforge.net, for
> instance, separate folders for things from GNOME SVN I have built
> myself (one folder for the current "stable" branch of things, one for
> the trunk, and one for each separate version of each package),
> separate folders for GNU libraries I have built (and distribute Win32
> binaries of) myself, etc.
>
>   
>> 2. zlib from zlib123-dll.zip had a couple of things. First, I had to
>> copy zlib1.dll to my bin/ directory. Secondly, the pkg-config files used
>> -lz as the linker flag, and thus I had to copy /lib/zdll.lib to
>> /lib/libz.a. The USAGE file said to rename zdll.lib to libzdll.a which I
>> ALSO did to ensure it works either way. Is this right? Why isn't it
>> libz.a already?
>> 
>
> Ask the people who make that package. Please understand that the
> distribution of Open Source software for Windows is not as tightly
> organized and managed as the packages for typical Linux distros. Some
> people do it one way, others another way.
>
>   
>> As I understand it, I can simply write my installer the
>> same way I did back in my Windows programming days and deploy it with
>> the DLL files necessary [as round] in the /bin dir.
>> 
>
> That is the way I recommend, yes. Keep the application executable and
> the DLLs of dependent libraries in the same "bin" folder of the
> run-time folder structure.
>
>   
>> 3. Is copying the .DLL dependencies to the system (\WINDOWS\SYSTEM32)
>> directory appropriate for the deployment of GTK+ applications on Win32?
>> I know it "works", but is that the standard convention?
>> 
>
> No. It is definitely not standard and correct these days. It used to
> be many years ago.
>
> --tml
>
>   
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Feedback on my Win32 GTK+ Experience

2007-11-25 Thread Tor Lillqvist
> 1. libxml-2.0 from libxml2-2.6.30.win32.zip was missing the .pc file for 
> pkg-config.

I guess libxml2-2.6.30.win32.zip is the one on
http://xmlsoft.org/sources/win32/ ? Please ask Igor Zlatkovic to
include also the .pc file in his packages.

http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/libxml2-dev-2.6.27.zip
(which is simply a slight repackaging by me of what Igor provides)
does include the .pc file.

> I simply found this file in the sources elsewhere and copied
> to C:\MinGW\lib\pkgconfig\libxml-2.0.pc. Is this normal?

Yes and no. If you have the rest of libxml2 under c:\mingw, then it is
the right thing to do.

My personal preference is not to mix stuff from different sources. I
keep only stuff from www.mingw.org in my mingw folder, and then I have
a separate folder for stuff from gnuwin32.sourceforge.net, for
instance, separate folders for things from GNOME SVN I have built
myself (one folder for the current "stable" branch of things, one for
the trunk, and one for each separate version of each package),
separate folders for GNU libraries I have built (and distribute Win32
binaries of) myself, etc.

> 2. zlib from zlib123-dll.zip had a couple of things. First, I had to
> copy zlib1.dll to my bin/ directory. Secondly, the pkg-config files used
> -lz as the linker flag, and thus I had to copy /lib/zdll.lib to
> /lib/libz.a. The USAGE file said to rename zdll.lib to libzdll.a which I
> ALSO did to ensure it works either way. Is this right? Why isn't it
> libz.a already?

Ask the people who make that package. Please understand that the
distribution of Open Source software for Windows is not as tightly
organized and managed as the packages for typical Linux distros. Some
people do it one way, others another way.

> As I understand it, I can simply write my installer the
> same way I did back in my Windows programming days and deploy it with
> the DLL files necessary [as round] in the /bin dir.

That is the way I recommend, yes. Keep the application executable and
the DLLs of dependent libraries in the same "bin" folder of the
run-time folder structure.

> 3. Is copying the .DLL dependencies to the system (\WINDOWS\SYSTEM32)
> directory appropriate for the deployment of GTK+ applications on Win32?
> I know it "works", but is that the standard convention?

No. It is definitely not standard and correct these days. It used to
be many years ago.

--tml
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: C vs C++ for GTK

2007-11-25 Thread Benoît Dejean

Le dimanche 25 novembre 2007 à 00:03 +0100, Tomas Carnecky a écrit :
> Patrick wrote:
> > is C++ to complicated? 
> C++ is more complex than C, and thus harder to fully understand.
> 
> > Is C going out of date?
> No, it's still being used for lots of projects.
> 
> > Am I limited with C?
> No, there are very few features in C++ that are hard/impossible to
> imitate in C, but you usually won't need those for small projects.

You can also do it in assembly if you have time.

> What people prefer mostly depends on their taste. I do C, my brother
> does C++, I can't say why that is.
> 
> Since you worked with python which is object oriented I would imagine
> going with C++ will be easier for you during the first weeks.

I've switched gnome-system-monitor to C++ and i'm very happy with it.
-- 
Benoît Dejean
GNOME http://www.gnomefr.org/
LibGTop http://directory.fsf.org/libgtop.html
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: {Spam?} Re: memory leak in gtk

2007-11-25 Thread Emmanuele Bassi

On Sat, 2007-11-24 at 10:09 +0100, Vincent Torri wrote:

> >> From what I've heard about memory leaking, this is not unique to the
> > GTK library.  If the rumours are correct, applications like `ls` are
> > notorious for leaking memory, safe in the knowledge that the OS will
> > clean up after them.
> 
> and if someone calls 'ls' iteratively in his program ?

if you call 'ls' in a child process the "leak" happens in you child
process, so it will be cleaned up by the OS when the child process
terminates and the parent reaps it. the memory will be reassigned to
other applications, thus is *not* a leak.

in a real leak the OS cannot reassign the leaked memory because your
application is still the owner.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: C vs C++ for GTK

2007-11-25 Thread Tomas Carnecky
Tomas Carnecky wrote:
> Allin Cottrell wrote:
>> One reason for going with C is that the great bulk of free 
>> software is in C, including GLib and GTK.  The main exception 
>> is Qt, the basis for KDE.  So if you might want to get into KDE 
>> programming, maybe learning C++ would be better.
> 
> You can use gtk in C++, there's gtkmm which is a thin wrapper on top of
> gtk! Many good gtk apps are written in gtk. So actually when using gtk
 ^^^
 C++

> you are less restricted in your programing language choice than with Qt.
> 
> tom

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: C vs C++ for GTK

2007-11-25 Thread Tomas Carnecky
Allin Cottrell wrote:
> One reason for going with C is that the great bulk of free 
> software is in C, including GLib and GTK.  The main exception 
> is Qt, the basis for KDE.  So if you might want to get into KDE 
> programming, maybe learning C++ would be better.

You can use gtk in C++, there's gtkmm which is a thin wrapper on top of
gtk! Many good gtk apps are written in gtk. So actually when using gtk
you are less restricted in your programing language choice than with Qt.

tom
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list