what have to i install for compiling of file.c that use gtk2 e file glade(makes with glade 3.8)?
i have install libglade with Pacman -S and i tried to compile with
gcc -export-dynamic File.c -o browser $(pkg-config --cflags --libs gtk+-2.0)\ $( pkg-config --cflags --libs libglade-2.0)
after this MinGW doesn't work.. for each comand it put in output things like :
1367211018 [main] bash 9420 fork: child -1 - forked process 8876 died unexpected ly, retry 0, exit code 0xC0000005, errno 11
bash: fork: retry: No child processes
1368436447 [main] bash 9420 fork: child -1 - forked process 3968 died unexpected ly, retry 0, exit code 0xC0000005, errno 11
bash: fork: retry: No child processes
1370680659 [main] bash 9420 fork: child -1 - forked process 1404 died unexpected ly, retry 0, exit code 0xC0000005, errno 11
bash: fork: retry: No child processes
bash: fork: No child processes
How can i resolve this and compile project with gtk(C),file.glade?
Have you some guide?
This is not exactly an answer, since I can't figure out exactly what your problem from the information provided. So, I need more space compared to that permitted by the "comment" box above (.. if SO moderators are upset by this, let me know, and I'll take down my submission).
First, what do you mean when you say "MinGW"? Do you mean:
1) you have built a proper MinGW environment and compiled all your code from scratch (e.g. following the excellent instructions such as these (http://ingar.satgnu.net/devenv/mingw32/index.html) )
2) You have download some Windows binaries for Glade etc?
3) You are using MSys2?
If you are using Msys2, I would be surprised for your Glade to be Gtk+ (2), as AlexPu (the head honcho at MSys2) has told me personally that he will not create a Gtk+ (2) variant of Glade, since he feels that would cause too much conflict with the Gtk3 variant. This means, on Msys2, the only way to have a (MinGW) Gtk+ (2) compliant Glade is to use the MSys2/AlexPu "create from scratch mystery mechanism". We have not ever been able to get that to build, not even with MSys2's help (and that process throws a lot of bash errors).
Therefore, one possibility is that you are using a Gtk3 Glade variant with Gtk2 code, which will never work, but that can't be the only "issue", see below.
Also, your reference to libs looks a bit different from what we would expect if you had proper MinGW Gtk+ machinery. For example, all of our Win/Gtk+ (2) apps, usually, would have to have at least the following libs required:
$(#gtk)\bin\libgtk-win32-2.0-0.dll
$(#gtk)\bin\libgdk-win32-2.0-0.dll
$(#gtk)\bin\libgobject-2.0-0.dll
$(#gtk)\bin\libglib-2.0-0.dll
... and usually many more for Pango, Cairo, etc.
These should be the same whether your compiled from scratch, or if just "installed via MSys2/pacman".
Of course, almost surely, there will be other dependencies, and "search paths" required, and various things must be on your "Path".
Second, your error messages are quite odd, and cite "bash" issues. That sounds more like "scripting/instruction" problems within whatever MinGW/Unix-like shell/system you are working in.
They don't sound like "proper Gtk crashes". Typically, Windows, will actually issue a SIGSEGV and also in the debugger log it will actually use the words "segmentation fault" etc. If the SIGSEGV is really nasty, Windows may not "say anything" explicitly (blank console, etc), and your GDB might see only "some mention" of "some" problem.
Also, if you are using Glade, then it is just an xml file that attempts to make your Gtk life easier. Gtk has code for interpreting the Glade xml files into otherwise virtual "Gtk code". Frankly, we have found that Glade is more trouble than its worth in many cases, and just writing the GUI via code is more efficient, again, often, not always.
Third, it is possible (we have done it) to use Glade based on Windows binaries, and link to libs therein, but that would be for the Glade libs, you would still need to obtain the (correct) Gtk+ libs.
As you can see, it is difficult to provide a precise answer without knowing more about your set up.
I would strongly recommend also that you do not run from the command line. It can be done, but there is much too much in the way of fiddly things that need to be "connected" to have Gtk/Glade/GCC etc all talking to each other correctly. I would strongly recommend installing Code::Blocks (http://www.codeblocks.org/); it's free and excellent (or some decent IDE). Then, you can very easily set up your paths/dependencies (after you have confirmed the existence of the dll's/lib's, and their exact path, versions, tc.).
Also, the CodeBlock's community has considerable experience integrating external packages (like Glade/GCC/Gtk etc).
Some, not all, MinGW dll's will include version numbers, right click the dll, click properties and look for, depending on your OS, "version" or "details" etc where the dll's version number is kept. All the Gtk ones will. Often, the file name also incorporates version number "indicator", but sometimes it's best to be sure.
BTW, if your Glade has a ver num > 3.8.5, then almost surely it's Gtk3.
Incidentally, had you coded everything "correctly" and supplied all the libs, etc etc. but some of the libs were Gtk2 while others were Gtk3 (and there are no other major problems), then Gtk itself would disallow it, and tell you it wont accept "mixed 2 and 3".
... as before, our experience with MSys2 has been an unhappy one. We have found that investing about a day or so and following "Ingar's instructions" (http://ingar.satgnu.net/devenv/mingw32/index.html) will provide you a built from scratch fully functioning Windows MinGW infrastructure with GCC/Gtk etc, and that you have complete control over, and know where everything is, and what everything does etc.
Related
I have begun to use GTK(2), and I find that the workings of the library to be very good, but the documentation sucks.
I want to upgrade to GTK3, but it seems I need to install something called packman. That is a difficult philosophical step for me. Why can't I simply download a zip file(s) somewhere?
The documentation uses a lot of words without saying much, and the downloads want you to download stuff OTHER then gtk in order to get gtk. Why don't they simply have a GTK package and let me decide if I need all the other stuff.
Also, I have been reading on forums, even if I do the packman stuff, it still isn't enough for C::B.
Anyway, that is mostly a rant, what I'd really like is a suggestion to an alternative to GTK+.
Here are some of my requirements...
#1, It must NOT be an interpreter. Using Code::Blocks and C, I get an exe file and I'd like to continue that way.
#2 It must be programmable using C. I'd really like to stick wiith C::B, but I guess in a pinch I can use Eclipse (although that is another nightmare I won't get into here.)
#3 GTK requires a bunch of DLL's to be shipped along with the exe file. It would be ideal if the entire target could be included in the single exe without having to rely on external dll's or .net framework or other external stuff.
Any suggestions woule be apreaciated.
Thanks, Mark.
You best bet is to give a look at https://en.wikipedia.org/wiki/List_of_widget_toolkits#High-level_widget_toolkits
If you wan to stick to C and not C++, then Qt is out.
The other that stands out is EFL. I've never used it myself, but it has good reputation and probably your best bet if you want to quit GTK+ and stick to C. However I don't know how easy it is to use it on Windows.
Now about GTK+:
Also, I have been reading on forums, even if I do the packman stuff, it still isn't enough for C::B.
There are people here that use GTK+ with Code::Blocks, so I don't get what kind of problem you're referring to.
Then your other problems:
The documentation uses a lot of words without saying much
Examples?
the downloads want you to download stuff OTHER then gtk in order to get gtk
What you don't get is that GTK+ is more that just the libgtk library. It has dependencies on a lot of other libraries, like glib, cairo, pango, etc. In the past there used to be a bundle or installer to have that installed on Windows, but people would mess up on setting the environment up based on their needs and give up. As the GTK+ manpower for the Windows platform is limited, the GTK+ team delegated the distribution of the GTK+ binaries to the MSYS2 project.
MSYS2 is a popular project that provides a lot of open source software already built for Windows, and solves the problem of building and installing dependencies by hand for the user. This step is made to make installation simpler, not harder. In a handful of commands you have GTK+ and all its dependencies installed for your platform, and can start coding your app. Another command and you have python and the python GTK+ bindings installed and can get started. Want to depend on another popular library? Chances are MSYS already provides it.
Windows has been known for decades to be bad on dependency management. If package management wasn't a a pain point on Windows, then stuff like chocolatey or conan wouldn't exist.
Your philosophical reluctance is merely that: philosophical. Sure GTK+ on Windows isn't perfect. With MSYS2 you will get packages built with gcc so the debug symbols are not compatible with the Visual Studio debugger and you will need to use gdb instead. But on your other question you say you use gcc and loathe Visual Studio, so this should not be a blocker to you.
GTK requires a bunch of DLL's to be shipped along with the exe file. It would be ideal if the entire target could be included in the single exe without having to rely on external dll's or .net framework or other external stuff.
This is not possible for the moment as static compilation of GTK+ isn't supported. The redistribution of an app, however, isn't as easy as I'd like it to be. The best way on Windows to redistribute your app while using MSYS2 is to create a pacman package for your app, listing its dependencies, then call pacman to install your app on an empty directory and tell it to install all your dependencies there too. The result will be a directory that you can redistribute, with a self-contained installation of your app and all its dependencies, GTK+ included.
My eclipse tries to compile/build Perl files in my Java project and fails. I installed Perl EPIC just for syntax colouring, how can I get it to ignore errors?
I tried going into Project->Properties->Builders, and uncheck Perl Epic, this didn't change anything.
I'm using Eclipse :Helios Service Release 1
Build id: 20100917-0705
On Windows XP
I have basically the same issue as this question,
How can I set up Eclipse to edit Perl without the runtime checking?
I've been looking into similar issue for quite some time too. Apparently the Epic Perl plugin goes wildly checking anything/folder/file it finds inside the project, so like mine where I have config files, data directories, it goes inside and tries to validate "perl stuff", which evidently is an annoyance: the error log view displays a lot of useless information.
Did you try to uncheck the "Perl Auto Builder" ?
I'm not parsing this sentence in the context of your question: "My eclipse tries to compile/build perl files in my java project and fails."
Are you saying that you are running perl as a java project, and getting the inevitable error message because it is not java? Just wondering why you don't want to have your perl program set up as a perl project possibly referenced by your java project, assuming that that is what you are trying to do.
Generally, when I set up a perl project, I edit its properties and set its includes to match the current directory or local module paths. Assuming that there are self-written modules I must call, and they are not located on this machine (e.g. I wouldn't have FOO::smb on a windows machine -- it makes no sense. When I am developing for linux, I will put all my functions in there for convenience's sake)
In that case, I create a FOO directory in the workspace, and create a dummy FOO::smb module with however many stub functions in it to get me going and let my syntax highlighting and error checkign do their proper jobs for me. If I write dummy subs to match the real modules well enough, I can debug my scripts somewhat before uploading them. I figure that I should be well enough aware of what they are supposed to do anyway.
I will go so far as to dummy out CPAN modules assuming that installing them on my development workstation makes no sense or is impossible. Highlighting and syntax checking are both invaluable tools, and finding a way to make both of them work saves my sanity.
What is a command line compiler?
Nowadays, you tend to have environments in which you develop code. In other words, you get an IDE (integrated development environment) which is comprised of an editor, compiler, linker, debugger and many other wonderous tools (code analysis, refactoring and so forth).
You never have to type in a command at all, preferring instead a key sequence like CTRLF5 which will build your entire project for you.
Not so in earlier days. We had to memorize all sorts of arcane commands to get our source code transformed into executables. Such beautiful constructs as:
cc -I/usr/include -c -o prog.o prog.c
cc -I/usr/include -c -o obj1.o obj1.c
as -o start.o start.s
ld -o prog -L/lib:/usr/lib prog.o obj1.o start.o -lm -lnet
Simple, no?
It was actually a great leap forward when we started using makefiles since we could hide all those arcane commands in a complex file and simply execute make from the command line. It would go away and perform all those commands for us, and only on files that needed it.
Of course, there's still a need for command-line compilers in today's world. The ability to run things like Eclipse in "headless" mode (no GUI) allow you to compile all your stuff in a batch way, without having to interact with the GUI itself.
In addition, both Borland (or whatever they're calling themselves this week) and Microsoft also provide command-line compilers for no cost (Microsoft also have their Express editions for free as well).
And gcc is also a command-line compiler. It does its one job very well and leaves it up to other applications to add a front end, if people need that sort of thing.
Don't get me wrong. I think the whole IDE thing is a wonderful idea for a quick code/debug cycle but I find that, once my applications have reached a certain level of maturity, I tend to prefer them in a form where I can edit the code with vim and just run make to produce the end product.
A command-line compiler is one that you run from the command line.
You type in gcc filename.c to compile a file (or something like that). Almost all compilers have a command-line version, and many have GUIs where you never see the command line, but the command line is still there. – Bill K Oct 5 at 16:27
(Bill K provided a nice answer in the comments... copied here and lightly edited by Mark Harrison, set to community wiki so as not to get rep.)
I am a newbie when it comes to gVim, Perl & test scripts, so I hope this is not a stupid question?
I have successfully installed Perl::Tags 0.26 under Linux and OS X but am getting installation test errors under WIN32 -- also see perl.cpan.testers
My questions are:
(i) Does VIM need Perl::Tags or can I rely on exuberant ctags to generate the appropriate tags for me?
(ii) If I need Perl::Tags then how does one fix the following issue -- many of the installation tests seem to fail because the test expects /Test.pm but gets \Test.pm under WIN32. Here is an example from test 02_subclass.t :
Current test does fails under WIN32
like ($todo_tagger, qr{Test\t\S+/Test.pm\t/package Test;/} , 'package line');
This test succeeds - note the directory slash
like ($todo_tagger, qr{Test\t\S+\\Test.pm\t/package.Test;/} , 'package line');
Will this prevent the tags file working?
I can't speak to the usefulness of Perl::Tags (I use ctags myself, but I don't currently use any tags for Perl), but as for the test failures, they look harmless. Everything should go okay if you do a "notest install". I've filed a bug report on rt.cpan.org about the failing tests.
I’m using the gcc in MinGW that comes with Strawberry Perl, on Windows XP. I’d like to have ddd (the Data Display Debugger) as well but apparently on Windows the simplest way to get ddd is by running Cygwin. So what's the bare minimum of Cygwin I can install to get ddd up and running? I'd prefer if I could run ddd natively on Win32 but that doesn't seem to be an option.
As far as I can tell so far, only the following (with Cygwin DLL release version 1.5.25-15), and allowing setup to install any other packages to meet dependencies.
Base: base-files, grep
Develop: ddd, gdb
Math: gnuplot
Example to get grep working: Just drop the following files from a cygwin bin directory into an appropriate directory...
cyggcc_s-1.dll
cygiconv-2.dll
cygintl-8.dll
cygpcre-0.dll
cygwin1.dll
grep.exe
The Cygwin setup.exe installer resolves dependencies for you. Just run the installer, find and enable ddd, and click Next. It might install some packages you doun't strictly need, but figuring out which ones you can safely omit is probably a waste of time.
Disclaimer: I haven't tried this; I just install eveything.
If you're going for minimalism, you might want a smaller X server than cygwin-x11 (though it's what I use, and I'm quite fond of it). Starwin X-Win32 is actively maintained (though it costs $$ beyond the trial period), and avoids the overhead of installing Cygwin proper; there are other, zero-cost minimal X servers for win32 available, but I don't have linkage immediately available.
As the documentation at x.cygwin.com indicates, the xorg-x11-base package is the bare minimum needed.