Whats the difference between one two and three "*" ?
Whats up with "(*)" ?
I'm reading my C++ book at maximum speed. I think I encountered a single * star being a pointer. I know there is a difference between it being before and after the declaration. I haven't encountered what the the others are. Hopefully by the time I complete the book I'll be able to debug more?
Anybody know what dirent is ? Is it a custom type like a struct or union?
compiling problems with Fedoa 11 (revision 12556)
-
- Bounty Hunter
- Posts: 174
- Joined: Wed May 27, 2009 6:38 am
- Location: Fresno, California - United States of America
- Contact:
-
- Bounty Hunter
- Posts: 174
- Joined: Wed May 27, 2009 6:38 am
- Location: Fresno, California - United States of America
- Contact:
Re: compiling problems with Fedoa 11 (revision 12556)
Also of note is the error reports that argument 4 is having the problem
The last argument (scancompare)&datesort
What are they, what do the parenthesis do?
Code: Select all
int ret = scandir (savedir.c_str(),&dirlist,nodirs,(scancompare)&datesort);
What are they, what do the parenthesis do?
-
- Bounty Hunter
- Posts: 174
- Joined: Wed May 27, 2009 6:38 am
- Location: Fresno, California - United States of America
- Contact:
Re: compiling problems with Fedoa 11 (revision 12556)
never mind I have it
Lines 3148-3152
It sets the definition for (*scancompare)... dirent on _WIN32 and __CYGWIN__ and void on everything else.
By changing the definition for everything else to the definition of of WIN32 and CYGWIN I'm successfuly compiling.
What needs to be done next is fix this right. If my build works properly, I'll check to see if this is a change in the version history of scandir. If so then a m4 macro will need to be created to explicitly for what kind of scandir to use (if such a macro hasn't been created), then we can set a _SCANCOMPARE_TYPE_ preprocessor flag rather than checking host type.
Lines 3148-3152
Code: Select all
#if defined(_WIN32) && !defined(__CYGWIN__)
typedef int (*scancompare) ( const struct dirent **v1, const struct dirent **v2 );
#else
typedef int (*scancompare) ( const void *v1, const void *v2 );
#endif
By changing the definition for everything else to the definition of of WIN32 and CYGWIN I'm successfuly compiling.
What needs to be done next is fix this right. If my build works properly, I'll check to see if this is a change in the version history of scandir. If so then a m4 macro will need to be created to explicitly for what kind of scandir to use (if such a macro hasn't been created), then we can set a _SCANCOMPARE_TYPE_ preprocessor flag rather than checking host type.
-
- Bounty Hunter
- Posts: 174
- Joined: Wed May 27, 2009 6:38 am
- Location: Fresno, California - United States of America
- Contact:
Re: compiling problems with Fedoa 11 (revision 12556)
The build worked
-
- Bounty Hunter
- Posts: 174
- Joined: Wed May 27, 2009 6:38 am
- Location: Fresno, California - United States of America
- Contact:
Re: compiling problems with Fedoa 11 (revision 12556)
Code: Select all
diff --git a/vegastrike/src/cmd/basecomputer.cpp b/vegastrike/src/cmd/basecomputer.cpp
index eb97e3f..dffe63b 100644
--- a/vegastrike/src/cmd/basecomputer.cpp
+++ b/vegastrike/src/cmd/basecomputer.cpp
@@ -3145,7 +3145,7 @@ static int datesort ( const void *v1, const void *v2 ) {
return s1.st_mtime - s2.st_mtime;
}
-#if defined(_WIN32) && !defined(__CYGWIN__)
+#if defined(_WIN32) && !defined(__CYGWIN__) || defined(__USE_DIRENT_SCANDIR__)
typedef int (*scancompare) ( const struct dirent **v1, const struct dirent **v2 );
#else
typedef int (*scancompare) ( const void *v1, const void *v2 );
EDIT: It turns out that I needed to run ./configure again after setting the CXXFLAGS value
-
- Bounty Hunter
- Posts: 137
- Joined: Wed Apr 08, 2009 6:07 am
Re: compiling problems with Fedoa 11 (revision 12556)
Did anyone figure this one out? I'm getting the same error now, using rev 12568.Genghis Prawn wrote:using revision 12562:
I corrected the lines shown in the patch for revision 12556. I now get this message
In file included from src/gui/glut_support.cpp:27:
./src/gldrv/gl_globals.h:235: error: ‘PFNGLCOMPRESSEDTEXIMAGE2DPROC’ does not name a type
make[1]: *** [src/gui/glut_support.o] Error 1
make[1]: Leaving directory `/home/norman/Vegastrike/vegastrike'
make: *** [all] Error 2