RE: Compile Problems
[email protected] Mon, 14 Apr 2003 10:41:18 +0100
| Newsgroups | gmane.comp.video.gimp.windows.devel |
|---|---|
| Message-ID | <B1F38D7B53615140BCEA6677DF9F2F8C0111133F@i2km11-ukbr.domain1.systemhost.net> |
> >I have Windows2000 and I got MinGW and the GTK+ lib and dev > files from > >GTK+'s website. I was trying to test system by using the "base" GTK+ > >program in the GTK+-2.0 tutorial, but I got hundereds of errors. One > >of the errors was "A fucntion returns function...". I don't think I > >installed it right. Where should I put the files that I need? The gcc > >version was 3.2. > > > > > Hmm, this is exactly the same set up I have, I'm new (first dl > yesterday!) and everything worked as soon as I got my path correct. I > compiled the base programs in the tutorial without a hitch and I'm > busily learning how to now generate the program I want. > > Perhaps a bit more info would help us diagnos your troubles. What > command line(s) are you using to compile, and what exactly are the > errors? The first 10 or so should be enough, we I don't > think we need > all 100+ ^_^ Any other steps you went through, including > setting your > path and where you actually put stuff would help too. This should be easy, it takes me 10 minutes to get the WHOLE gtk library thing setup on windows on my box. Here is what you want to do, download all the files necessary from Tor's site, extract them ALL to a common directory, say 'top'. The only problem thats that you will have are with libintl. If I remember correctly, when you download it and extract it, it does not have the same /etc /bin ... directory structures saved for the files. Therefore, it will put the .dll, .lib, .h, etc files all in one directory. You need to put *.exe in /top/bin, *.dll and *.lib in /top/lib and *.h in /top/include. Also I think the DLL is something like libintl.dll and the packages in pkgconfig look for libintl-1.dll. I simply copied it to the name that was required. Then you want to edit your environment (if on windows 4/2k/xp) or your autoexec.bat (if any other windows os) and add to the path the c:\top\lib and c:\top\bin directories. This means all your libs and executables (like pkg-config) are runnable anywhere. From there... all you should have to do is use something like below: (for object files) gcc -c -Wall -g -mms-bitfields -I/c/helloworld `pkg-config glib-2.0 gdk-2.0 gtk+-2.0 libglade-2.0 --cflags` helloworld.c -o Win32MinGW/helloworld.o (for linking) gcc -o Win32MinGW/helloworld Win32MinGW/helloworld.o -L/c/somelibrary -mwindows `pkg-config glib-2.0 gdk-2.0 gtk+-2.0 libglade-2.0 --libs` -lgdi32 Regards, Martyn