POV-Ray : Newsgroups : povray.unix : Compiling on Cygwin : Re: Compiling on Cygwin Server Time
28 Jul 2024 10:22:26 EDT (-0400)
  Re: Compiling on Cygwin  
From: Christopher James Huff
Date: 2 Aug 2002 13:34:21
Message: <chrishuff-4F3E32.12250802082002@netplex.aussie.org>
In article <web.3d4a752b6a7e3952bbe30ae0@news.povray.org>,
 "Thomas" <tho### [at] gmxnet> wrote:

> Since everyone started to do private compiles I thought I might give it a
> try on Cygwin (unix enviroment under Windows). And I end up with the
> following error:
> 
> g++ -DPREFIX=\"/usr/local\" -DPOV_LIB_DIR=\"/usr/local/share/povray-3.5\"
> -DCOMPILER_VER=\".Linux.gcc\" -DSYSCONFDIR=\"/usr/local/etc\"     `if [
> "Xgcc" = "Xgcc" ]; then echo "-Wno-multichar"; fi ` -I/usr/X11R6/include
> -I/usr/X11R6/include/X11 -c unix.cpp
> unix.cpp:101: libgen.h: No such file or directory
> make: *** [unix.o] Error 1
> 
> And I don't seem to have libgen.h on my system at all, any clue where I
> could find a copy of it?

When I compiled under Mac OS X, I just commented the #include out and 
implemented my own basename() and dirname() functions. They haven't been 
tested, but here they are:

char * basename(char * path)
{
    int j = 0;
    int idx = 0;//current starting location of copy
    while(path[j])
    {
        if(path[j] == '/')
        {
            idx = 0;
        }
        else
        {
            path[idx] = path[j];
            idx++;
        }
        j++;
    }
    path[j] = '\0';
    return path;
}

char * dirname(char * path)
{
    int idx = -1;//index of last '/' in string
    for(int j = 0; path[j]; j++)
        if(path[j] == '/')
            idx = j;
    
    if(idx != -1)
        path[idx + 1] = '\0';
    
    return path;
}

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.