On 27 Sep 2009, at 19:10, Edzard Egberts wrote:

> Am 26.09.2009 00:25, schrieb imacarthur:
>>
>> On 25 Sep 2009, at 18:24, Edzard Egberts wrote:
>> The only things that the fltk configure script actually generates are
>> the "config.h" and "makeinclude" files.
>
> I found there are some more files created and to be sure I compared  
> and
> edited them all:
>
> configure: creating ./config.status
> config.status: creating makeinclude

Needed.

> config.status: creating fltk.list

Only used if you are making RPM packages - you aren't.

> config.status: creating fltk-config

Only useful if you are using fltk-config for your builds (you may  
well be?) I don't generally find it helpful in a cross-compilation  
environment.

> config.status: creating fltk.spec

Only used in making EPM packages - which (again) you are not.

> config.status: creating FL/Makefile

Only needed if you plan on doing a "make install" - which you don't,  
not of the cross-compilation stuff.

> config.status: creating config.h

Needed.

> It is really sufficient only to edit "config.h" and "makeinclude"?

Yes - as outlined above.

> After that I went to the terminal and made a minimum path, that
> contained the MinGW tools. Then I started a make and ran into the  
> first
> problem - -mwindows and -mno-cygwin are not known command line  
> options,
> so I removed these options from all the files.

That sounds very odd - how sure are you that the correct version of  
gcc was invoked?
Can you show us some command lines, and some compiler output?

> But the next problem stopped me now:
>
> [...@entwicklung fltk-1.1.10gdi]$ make
> === making jpeg ===
> === making zlib ===
> === making png ===
> Compiling png.c...
> In file included from png.c:16:
> png.h:1156: Fehler: expected »)« before »*« token
>
> It is easy to see, that problem comes from definition of PNGAPI and I
> found flag dependend definitions in pngconf.h starting with line 1331.
> Because I don't know, how pngconf.h is linked to png.h I minded the
> easiest way to solve the problem is to define PNGAPI inside of png.h,
> but this is not good enough, because only the next definition problem
> appears after doing that. Does anyone know, what kind of flags I  
> had to
> set and in which file, to solve this problem?

I have never had a problem cross-compiling PNG - it has always Just  
Worked, so I don't even know where to start with that...

That said, I have never tried to use the fltk built-in image libs for  
cross-compilation... I have always built them from the "proper" png,  
zlib and jpeg tarballs first, and then sets the paths in my fltk  
build to use these "system" versions, so you are probably treading  
ground I have never covered before!

The fltk built-in libs are pretty much stock, so if you build them  
first, each in its own dir, cross-compiled for your target, it pretty  
much ought to Just Work for you too.
Again, there may be some hand tweaking of Makefiles and so forth,  
depending on your paths and such...

That said, IIRC, the last time I built PNG and zlib they did honour  
the --host and --target options to configure so it was easy to set up.
I can't even remember what I did to cross-compile libjpeg...





_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to