UIKit0 / alembic

Automatically exported from code.google.com/p/alembic
Other
0 stars 0 forks source link

Alembic 1.1.0 does not compile on Windows #291

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download Alembic 1.1.0 
2. Compile Alembic 1.1.0
3. Build errors

What is the expected output? What do you see instead?
2 build errors.

What version of the product are you using? On what operating system?
Alembic 1.1.0

Please provide any additional information below.
1) OMaterial.cpp, line 130
"interface" is a MSVC reserved token. Please rename "interface" member variable.

2) TimeSamplingType.cpp, line 46
std::numeric_limits::max() conflicts with max() in windows.h
Please define NOMINMAX before include Windows.h in Alembic/Util/Foundation.h

Thanks~

Original issue reported on code.google.com by shinc...@gmail.com on 17 Sep 2012 at 10:40

GoogleCodeExporter commented 9 years ago
btw, in alembic_bootstrap.py line 250, libdir is assigned twice.
The second assignment is boost python.
If I build alembic without python, libdir is always "." and cmake complains it 
can't find boost.

Original comment by shinc...@gmail.com on 17 Sep 2012 at 10:53

GoogleCodeExporter commented 9 years ago
http://code.google.com/r/millerlucas-dev/source/detail?r=1e222facd09dad2a33a7e5b
d432d1bc7c3cb578c

http://code.google.com/r/millerlucas-dev/source/detail?r=96aa5a13380ed9f95a02c73
f9b6f62b12aacf2f2

Attempts to deal with the your initial comments.  Could you try it out?

Original comment by miller.lucas on 17 Sep 2012 at 6:48

GoogleCodeExporter commented 9 years ago
iirc. I solved this by defining WIN32_LEAN_AND_MEAN

Original comment by axelgnei...@gmail.com on 17 Sep 2012 at 8:26

GoogleCodeExporter commented 9 years ago
The 2 changes solved the build errors.
I can now build successfully with VC9/VC10+x86/amd64 combinations.
Thanks.

Original comment by shinc...@gmail.com on 18 Sep 2012 at 2:11

GoogleCodeExporter commented 9 years ago
In CentOS5+gcc4.1.2 environment, there is a warning in 
Alembic/AbcCoreHDF5/ArImpl.cpp line 211.
warning: passing NULL to non-pointer argument 2 of 'ssize_t H5Aget_name(hid_t, 
size_t, char*)'.
Not a big issue but warning-as-error stops my build.

Original comment by shinc...@gmail.com on 18 Sep 2012 at 9:59

GoogleCodeExporter commented 9 years ago
Thanks, the logic in the section that was being warned about had a few more 
issues than just the warning.

Fortunately that code would only get run if the HDF5 Attrs weren't being 
properly cleaned up in the rest of the code.

Here is a much better fix:
http://code.google.com/r/millerlucas-dev/source/detail?r=3c842a49419b8e90e2f98a2
d40bddd69edff2c03

Original comment by miller.lucas on 18 Sep 2012 at 4:39

GoogleCodeExporter commented 9 years ago
When I was trying to integrate AbcImport and AbcExport, I found our building 
system force to define NOMINMAX by compiler command line arguments. I got a 
macro redefinition warning.. Could you wrap the define with ifndef like:
#ifndef NOMINMAX
    #define NOMINMAX
#endif

Thank you again!

Original comment by shinc...@gmail.com on 19 Sep 2012 at 8:04

GoogleCodeExporter commented 9 years ago
Yeah, that isn't controversial:

http://code.google.com/r/millerlucas-dev/source/detail?r=fbbd1b9e530b0ae66b986d5
1223edef51f97c9ff

Original comment by miller.lucas on 19 Sep 2012 at 5:18

GoogleCodeExporter commented 9 years ago

Original comment by miller.lucas on 12 Oct 2012 at 12:18