Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error on Centos 6.2 #34

Open
mattebb opened this issue Dec 17, 2012 · 0 comments
Open

Compile error on Centos 6.2 #34

mattebb opened this issue Dec 17, 2012 · 0 comments

Comments

@mattebb
Copy link

mattebb commented Dec 17, 2012

Hi,

I get a strange compile error building partio on centos 6.2. I'm actually building the redpawfx fork, but at a glance, it looks like the issue is not in the forked changes, so I'll post the issue here - please let me know if you'd like me to move the issue to that repo!

Anyway, when building the PDB files, I get a lot of errors similar to this
[ 20%] Building CXX object src/lib/CMakeFiles/partio.dir/io/PDB.o
cd /home/users/matteb/Downloads/partio/partio.build/src/lib && /usr/bin/c++ -DPARTIO_USE_ZLIB -fPIC -O3 -DNDEBUG -I/home/users/matteb/Downloads/partio/src/lib -Wall -o CMakeFiles/partio.dir/io/PDB.o -c /home/users/matteb/Downloads/partio/src/lib/io/PDB.cpp
In file included from /usr/include/stdio.h:929,
from /home/users/matteb/Downloads/partio/src/lib/io/pdb.h:48,
from /home/users/matteb/Downloads/partio/src/lib/io/PDB.cpp:41:
/usr/include/bits/stdio.h: In function ‘int PDB::vprintf(const char_, va_list_tag)’:
/usr/include/bits/stdio.h:39: error: cannot convert ‘PDB::IO_FILE’ to ‘FILE
’ for argument ‘1’ to ‘int PDB::vfprintf(FILE_, const char_, va_list_tag)’
/usr/include/bits/stdio.h: In function ‘int PDB::fgetc_unlocked(FILE
)’:
/usr/include/bits/stdio.h:56: error: invalid use of incomplete type ‘struct _IO_FILE’
/usr/include/stdio.h:45: error: forward declaration of ‘struct _IO_FILE’
/usr/include/bits/stdio.h:56: error: invalid use of incomplete type ‘struct _IO_FILE’
/usr/include/stdio.h:45: error: forward declaration of ‘struct _IO_FILE’
...

I'm not an expert with C++ build issues, but I noticed it was looking at PDB::fgetc, which seems like it's putting the standard library stuff in the PDB namespace. I edited PDB.cpp and removed the:
namespace PDB
from around:
#include "pdb.h"

and put the namespace PDB in pdb.h directly, after

#include <stdio.h>
#include <stdlib.h>

This now compiles correctly.

Is this a genuine bug? Or maybe a mis-configuration on this system?

cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant