I really don’t understand how to fix this redefinition error.
COMPILE+ERRORS
g++ main.cpp list.cpp line.cpp
In file included from list.cpp:5:0:
line.h:2:8: error: redefinition of âstruct Lineâ
line.h:2:8: error: previous definition of âstruct Lineâ
main.cpp
#include <iostream>
using namespace std;
#include "list.h"
int main() {
int no;
// List list;
cout << "List Processorn==============" << endl;
cout << "Enter number of items : ";
cin >> no;
// list.set(no);
// list.display();
}
list.h
#include "line.h"
#define MAX_LINES 10
using namespace std;
struct List{
private:
struct Line line[MAX_LINES];
public:
void set(int no);
void display() const;
};
line.h
#define MAX_CHARS 10
struct Line {
private:
int num;
char numOfItem[MAX_CHARS + 1]; // the one is null byte
public:
bool set(int n, const char* str);
void display() const;
};
list.cpp
#include <iostream>
#include <cstring>
using namespace std;
#include "list.h"
#include "line.h"
void List::set(int no) {}
void List::display() const {}
line.cpp
#include <iostream>
#include <cstring>
using namespace std;
#include "line.h"
bool Line::set(int n, const char* str) {}
void Line::display() const {}
asked Feb 23, 2013 at 15:57
1
You need to put include guards in your headers.
#ifndef LIST_H_
#define LIST_H_
// List.h code
#endif
answered Feb 23, 2013 at 15:59
juanchopanzajuanchopanza
221k33 gold badges398 silver badges474 bronze badges
6
In list.cpp, you are including both «line.h» and «list.h». But «list.h» already includes «line.h» so «list.h» is actually included twice in your code. (the preprocessor is not smart enough to not include something it already has).
There are two solutions:
- Do not include «list.h» directly in your list.cpp file, but it is a practice that does not scale: you have to remember what every of your header file includes and that will be too much very quickly.
- use include guards, as explained by @juanchopanza
answered Feb 23, 2013 at 16:02
Cyrille KaCyrille Ka
15.1k5 gold badges38 silver badges58 bronze badges
1
You are including «line.h» twice, and you don’t have include guards in your header files.
If you add something like:
#ifndef LINE_H
#define LINE_H
... rest of header file goes here ...
#endif
to your header files, it will all work out fine.
answered Feb 23, 2013 at 16:01
Mats PeterssonMats Petersson
126k14 gold badges132 silver badges221 bronze badges
Проблема множественного включения заголовочных файлов(headers)
Пример:
Пускай программа состоит из трёх файлов — main.cpp, a.h, b.h.
a.h:
Код |
|
b.h:
Код |
|
main.cpp:
Код |
|
В заголовочном файле a.h описывается структура point и объявляется функция func_a.
В заголовочном файле b.h включается заголовочный файл a.h и объявляется функция func_b.
В основном файле программы main.cpp подключаются заголовочные файлы a.h и b.h, в функции main() поочерёдно вызываются функции func_a, func_b, затем программа завершается.
Проблема:
Программа не компилируется. Компилятор выдаст ошибку, например так:
Код |
a.h:1: error: redefinition of ‘struct point’ |
Почему так происходит?
Директива компилятора #include говорит компилятору о том, что содержимое указанного файла нужно вставить в данное место.
Описание структуры point, итого, вставится в main.cpp два раза: 1-й раз — явно — при включении файла a.h, второй раз — неявно — при включении файла b.h, так как файл b.h тоже включает в себя содержимое файла a.h.
Код главного модуля сначала преобразуется в такое:
Код |
|
После чего снова обрабатывается #include и получается:
Код |
|
В этом, итоговом, коде присутствуют два определения struct point. Это и служит причиной выдачи ошибки компилятором.
Решение:
Использовать условные директивы компилятора #ifndef…#define…#endif.
Их также называют «стражами включения».
Код всех заголовочных файлов нужно обрамлять:
Код |
|
Идентификатором файла может быть любое правильной имя переменной в С/С++.
Однако, принято давать этим иденфикаторам имена, состоящие из больших букв латинского алфавита и подчёркиваний, логические связанные с именем файла.
К примеру, для файла abcd.h можно взять идентификаторы ABCD_H, FILE_ABCD_H, ABCD_H_INCLUDED
Важно: идентификаторы заголовочных файлов в пределах одной программы(одного проекта) должны быть разными, иначе Вы получите обратный результат(не множественное включения, а отсутствие включения).
Исправленный заголовочный файл a.h:
Код |
|
Работа этих директив в данном случае заключается в том, что в первой строчке проверяется, не определено ли A_H_INCLUDED. Если определно, значит, содержимое данного файла уже было включено, и компилятору не надо обрабатывать содержимое файла повторно. Если же нет, то определяем A_H_INCLUDED и обрабатываем дальше заголовочный файл.
В этом случае, код модуля с учётом произведённых #include имеет вид:
Код |
|
Итого получается следующее:
Код |
|
Это и есть желаемый нами код.
Данное решение работает на всех известных компиляторах С/С++.
Замечания:
1. В данном примере файл b.h тоже желательно должен быть обрамлён.
2. Не начинайте имя идентификатора с подчёркивания, это крайне не рекомендуется стандартом С++.
Другие решения.
Некоторые компиляторы С/С++ предоставляют ещё одно решение проблемы.
Для этого необходимо включить в начало каждого заголовочного файла директиву
Данная директива имеет тот же эффект, что и вышеприведенное решение, но для её применения потребуется компилятор, поддерживающий это расширение. В число таких компиляторов входят: компилятор из MS Visual Studio (MSVC), компилятор g++ из GCC.
Назад к FAQ
Это сообщение отредактировал(а) bsa — 26.7.2011, 11:02
cadaver
added a commit
that referenced
this issue
Jun 29, 2016
weitjong
added a commit
that referenced
this issue
Mar 12, 2018
77ade9603d Modify Assimp's build script to integrate with ours. cb31a7cf82 Remove unused files/directories. 80799bdbf9 Merge pull request #1631 from assimp/kimkulling-410_prep e8139ef515 Update utVersion.cpp 65d29c5420 Update CMakeLists.txt 406a06705e Update Doxyfile.in 28b01cbdd1 Update to 4.1.0 899748c651 Merge pull request #1627 from assimp/kimkulling-patch-2 0c2f4abe78 Update CREDITS bd8d3025bd Merge pull request #1622 from assimp/fix_model_xml_3mf 972d8517b5 fix the model xml 3d4256a7a7 Merge pull request #1620 from assimp/issue_1619 0588d6cccf FBX: closes assimp/assimp#1619: return correct index for embedded textures. 26cdec5633 Merge pull request #1618 from assimp/3mf_export_fixes c23c63e821 fix correct folder naming scheme. 95e9cd75fa 3MF: fix working test for 3MF-export. d3833fe804 Merge pull request #1611 from assimp/kimkulling-patch-2 36cddcc8b7 Update miniz.h fe6608175b Update miniz.h a59f0b29d5 Merge pull request #1604 from assimp/kimkulling-miniz-memoryaccessfix 98cb898463 Merge branch 'master' into kimkulling-miniz-memoryaccessfix b92c3ca161 fix invalid op 75b31377fc Merge pull request #1606 from elect86/patch-16 b8ab90ae4b Merge branch 'master' into patch-16 ed361f0b53 Merge pull request #1608 from turol/analyze 45f2f31011 miniz: Remove some dead assignments 26f749fcd2 Re-enable Clang static analysis 5702b907d4 Merge pull request #1607 from turol/unique_ptr 2c3558fdd0 Remove ScopeGuard b60d84a8a2 C4D: Replace ScopeGuard with std::unique_ptr bd4f024562 XGLLoader: Replace ScopeGuard with std::unique_ptr e8eccfa27d FBX: Replace ScopeGuard with std::unique_ptr 6f50be82aa 3MF: Replace ScopeGuard with std::unique_ptr f35d5952dc BlenderLoader: Replace ScopeGuard with std::unique_ptr af8e297e0f BaseImporter: Replace ScopeGuard with std::unique_ptr 42c1c733b9 Update MD3Loader.cpp 77b0aa4f4b Merge pull request #1602 from Matter-and-Form/fix/multibody-binary-stls 2897433358 Update miniz.h 4811c0bdd1 Merge branch 'master' into fix/multibody-binary-stls 4fe91f7a5b Merge pull request #1598 from assimp/export_3mf 5822d1920e Update STLLoader.cpp 915ee95ad3 Fx nullptr dereference. 5aa84a2610 Merge branch 'export_3mf' of https://github.com/assimp/assimp into export_3mf ac23034816 fix the exporter unittest when the export is disabled. c27fda62e5 Merge branch 'master' into export_3mf 9be69a90b1 Merge branch 'master' into fix/multibody-binary-stls 9d224f6ac5 Merge pull request #1603 from Matter-and-Form/fix/gltf-node-name-conflict 46caecdf35 enable compiler switch test for no exporter requested. 98e98dc40c Fix node names sharing same name 5c9ed540b2 Add test for GLB import 67c236647d Restore import of multi mesh binary STLs 59dcfefeb2 fix unaligned memory access. fd2da59427 fix unaligned memory access. b5e79c3cb6 fix invalid include ddd23fad3f Merge branch 'export_3mf' of https://github.com/assimp/assimp into export_3mf e442f5838f Merge branch 'master' into export_3mf e17f7010d1 Merge pull request #1599 from assimp/kimkulling-verbose-analyze ef4842e128 Update .travis.sh 6a2cd1c91d Update D3MFExporter.cpp 9bd9b3d99c Merge branch 'master' into export_3mf e6381b7616 Merge pull request #1594 from Matter-and-Form/fix/gltf2-transforms 4b6e49ca7b Update D3MFExporter.h 4f972661e8 Update D3MFExporter.cpp 7a395e274f Merge branch 'master' into fix/gltf2-transforms 3e9bb23688 Merge pull request #1595 from Matter-and-Form/fix/gltf2-preserve-node-names 8ce5985aa0 Merge branch 'master' into fix/gltf2-preserve-node-names 890920110c Merge pull request #1596 from Matter-and-Form/feature/gltf2-tangents 09f7769820 remove unused attribute. 8e413ac1e3 Merge branch 'master' into export_3mf 7280dec838 fix unittest. 3dfca3bc84 3MF: add export to a given archive. 0031165789 Add support for tangents in glTF2.0 import 0b04ae1d91 Preserve node names when importing glTF2.0 e53d4735b0 Fix transform matrices multiplication order per glTF2.0 spec 0ce3641deb Merge pull request #1589 from aavenel/fix-typo-gltf 623b5a515a Merge branch 'master' into fix-typo-gltf 44b38263a5 Merge pull request #1590 from aavenel/fix-cmake-unit-win b9845285ca Merge branch 'master' into fix-cmake-unit-win a41bef0d54 Merge pull request #1591 from aavenel/fix-warnings-win eb452b28a2 Fix warning on MSVC14 d529dd17f9 Fix warning cast double to float 273f6b0267 Fix MSVC14 warning cast double to real f80e8b39a1 Fix warning C4138: '*/' found outside of comment on MSVC14 c63263b025 Fix typo on gltf2 camera parameters d8d5cf1a2d Copy assimp dll to unit folder on windows 6c59c83e0f add missing include 0bdb375804 Add missing file export into archive. 09a5946dbd Prepare archive structure. 35819340aa Merge pull request #1588 from elect86/patch-15 ad2223f1c5 Merge branch 'master' into patch-15 a1c1ad74bd Merge pull request #1582 from mrautio/master fdb52723c4 Update Readme.md d180cfcba5 Merge branch 'master' into master ed4e6b0db0 Merge pull request #1580 from assimp/scene_combiner_crash e35f789ace Merge branch 'master' into scene_combiner_crash ac37977230 Merge pull request #1575 from elect86/patch-12 454b8919b0 use one header for all xml-tags. 6da4258206 Merge branch 'master' into patch-12 a2ba3d630d Merge pull request #1586 from turol/validate b474e75e29 3Mf-Export: add prototypes for relations and rest of 3MF-document. 127705d347 Unit tests: Enable data structure validation in cases where it doesn't cause failures a7be5b527f add missing return statement. 9ca7b00280 Merge branch 'master' into export_3mf c22b4acd47 3MF: Export initial commit. 70d9df868d Merge branch 'master' into patch-12 4cf8e10235 Merge pull request #1585 from pdaehne/master ba3acd7459 Merge branch 'master' into patch-12 a05d74a281 [glTF2] Moved byteStride from accessor to bufferView beff88228d Merge branch 'master' into master 4502d72ee6 Merge pull request #1584 from pdaehne/master 6cbfd5b977 [glTF2] Implemented reading binary glTF2 (glb) files 9f1dce8e57 Merge branch 'master' into master 4fb5038fb1 Add support for building Mac OS X Framework bundles 2a9f79f958 check for 0 properties before copy them 55c9761228 Merge branch 'master' into patch-12 9707fde709 check for nullptr dereferencing before copying scene data e1837b6cc8 Merge pull request #1576 from elect86/patch-13 65d6daa414 Merge branch 'master' into patch-13 b408e25a1d Merge pull request #1579 from assimp/fix_android 1a1d96d3e2 Merge branch 'master' into fix_android a8e65a1e8a Fix android build. 864a080b45 Merge pull request #1578 from turol/warnings 8ae7231654 Blender: Silence warning about uninitialized member 2c8cc1f732 BlenderDNA: Silence warning about uninitialized member bcffa28a33 MDLImporter: Don't take address of packed struct member 10f4b6f95c assimp_cmd: Fix strict-aliasing warnings 53119e74f8 Open3DGC: Fix strict-aliasing warnings 1067ae4bfa FIReader: Fix strict-aliasing warnings c1515db56f Blender: Fix strict-aliasing warnings 40bb3f3d0f Unit test: Fix signed/unsigned comparison warnings 3e78bd51d4 Merge pull request #1577 from elect86/patch-14 703d046fd9 Update ValidateDataStructure.cpp fc360b9cc8 Update ValidateDataStructure.h b428c66f39 Update ValidateDataStructure.h fb9a5950fd Merge pull request #1569 from assimp/issue_1513 07a99e0843 Merge branch 'master' into issue_1513 fae198ebfe Merge pull request #1572 from elect86/patch-11 d9965f6220 Update Importer.cpp 98da53e66a Merge pull request #1498 from turol/analyze 7db10022e9 closes assimp/assimp#1513: fix assimp for cross compile for android 983e52e308 unzip: Remove dead assignment 76de3e0828 clipper: Add assertion to silence a static analyzer warning c248ae3797 unzip: Remove dead assignments 9b88715361 unzip: Bail on bad compression method 0bc259fd95 unzip: Fix possibly uninitialized variables 11fdaa31bc clipper: Add assertion to silence a static analyzer warning fc59f190ae OpenDDLExport: Reduce scope of a variable ef91211231 OpenDDLExport: Remove dead variable be1d346c28 Open3DGC: Add assertions to silence static analyzer warnings 58d5d04e82 OpenDDLParser: Remove dead assignment 635a515e69 OpenDDLParser: Fix another potential memory leak eb5f47f5c5 OpenDDLParser: Fix potential memory leak 9dadec7736 assimp_cmd: Add assertion to silence a static analyzer warning f475803f93 X3DImporter: Add assertions to silence static analyzer warnings 66c18cc406 TerragenLoader: Remove unused variable e47bf932e8 SIBImporter: Add assertions to silence static analyzer warnings 583d3f88b8 FBX: Remove dead assignment ef0af40f90 IFC: Remove dead code b49a4e1338 PLY: Remove dead assignment and reduce scope of a variable 97843f19d2 OpenGEX: Add assertion to silence a static analyzer warning f470b8466f GLTF2: Fix signed/unsigned warning f90019bc1e NFF: Add assertions to silence static analyzer warnings 3f299b2a2b NFF: Split up some complicated assignments d24e0d44b2 Raw: Fix misleading indentation warning 2b93a210c9 NFF: Reduce scope of a variable 940449d837 LWO: Reduce scope of a variable a276a02726 IRRLoader: Fix confusing boolean casting 437816fc33 AssbinExporter: Add assertion to silence a static analyzer warning 4c9f169109 ASE: Add assertion to silence a static analyzer warning 856d402b59 AMFImporter: Add assertion to silence a static analyzer warning 2c7770eed5 AMFImporter: Add a block bd0d47c5fc Whitespace a7fccf8f33 OptimizeGraph: Fix possible null pointer dereference c51b92cfa3 RemoveRedundantMaterials: Add assertion to silence a static analyzer warning 95f2319b41 ImproveCacheLocality: Add assertion to silence a static analyzer warning c774e864a0 Remove some dead assignments 266e3b29a8 RemoveRedundantMaterials: Set pointer to nullptr after deleting it 35907e3446 Travis: Disable unit tests in scan-build config 59d1a1d819 Travis: Move slower builds earlier to improve parallelization 76919e87ea fast_atof: Silence some uninitialized variable warnings a15bfceb7e Travis: Add static analysis to build 80ba6d10f7 Merge pull request #1567 from assimp/fix_android_build c15c96ac76 CMake: use define for D_FILE_OFFSET_BITS only for not-android systems. 98a1b7671d Merge pull request #1558 from assimp/issue_216 24b728b3ea FindDegeneratives: adapt unittests and add configs 9206d1b62b Merge branch 'master' into issue_216 b2b671d8ad Merge pull request #1563 from assimp/fix_buggy_excape_sequence d0ac06cbfd fix buggy escape sequence. 9756b48bca Merge pull request #1560 from assimp/source_groups_for_ut 005b537324 unittests: add VS-based source groups for the unittests. 248e26ca03 Merge pull request #1557 from Matter-and-Form/gltf2-mesh-export-fix de1ec4ee5d Merge branch 'master' into gltf2-mesh-export-fix f0bed87e07 Merge pull request #1559 from luzpaz/misc-typos 12dbbd4ce9 Misc. typos ad2ff9fd71 check for area test if the face is a triangle. 30e06f7437 closes assimp/assimp#216: check the area of a triangle to check if its degenerated or not. 9ec117d0bc Fix export of deleted meshes; Add LazyDict::Remove method 9a13bf236f Merge pull request #1556 from assimp/issue_1292 5bc4e73727 Merge branch 'master' into issue_1292 bd104bda3b Merge pull request #1555 from assimp/issue_1315 ab639a71ae Merge branch 'master' into issue_1315 36475bf868 closes assimp/assimp#1292: export class subdivision cdfd4b9702 closes assimp/assimp#1315: check in exporting against out-of-bounds-access . 191454671d Merge pull request #1511 from eevictor/master 6954c7d75b Merge branch 'master' into master fe55bc9996 Update ColladaExporter.cpp c11a93e73c Merge pull request #1552 from assimp/issue_1251 6b826fecfd Merge branch 'master' into issue_1251 f41ed2f41f closes assimp/assimp#1251: use correct lookup for utf32. 792523ce90 Merge pull request #1551 from larsjsol/md2_fix 29cf414468 Merge branch 'master' into md2_fix a88a23ac7c Merge pull request #1549 from assimp/issue_104 75fdd25b6b Merge branch 'master' into issue_104 da7ce89ff2 Update STLLoader.cpp b87e7643d2 Update STLLoader.cpp 4ff2592747 Update STLLoader.h 26171a7949 SLD: add test model and a unit test. 9a9f18bbed closes assimp/assimp#104: deal with more solids in one STL file. 10a6524300 Merge pull request #1545 from assimp/issue_213 a77d9d7b21 Merge branch 'master' into issue_213 e09349c734 Merge pull request #1544 from assimp/issue_1526 4a4f3fddc7 closes assimp/assimp#213: log an error instead of letting the fbx-importer crash. 6b04b20869 closes assimp/assimp#1526: use correct include folder for assimp. b0e86d281b Merge pull request #1543 from assimp/issue_1533 5922200ec3 Merge branch 'master' into issue_1533 9835d28f72 Merge pull request #1542 from assimp/UnitTest_X3D f43586305c closes assimp/assimp#1533: put irrXML onto exclucde list for doxygen run. ab3cf3687c Merge branch 'master' into UnitTest_X3D 770f531cc6 X3D-Importer: add missing file. 2929a27edc add unittest for x3d-importer. 1e9919ce81 Merge pull request #1541 from assimp/issue_1351 02b042d78e closes assimp/assimp#1351: use correct name for obj-meshname export for groups. abca0a79f3 Merge pull request #1538 from assimp/aavenel-unittest_obj_importer a33e115fd1 fix mem-lead: face will be not released in case of an error. c9ada44ab5 Fix memory leak in case of an error. 4879fe13ca Merge branch 'unittest_obj_importer' of https://github.com/aavenel/assimp c700c08fa5 Merge branch 'master' into master d5692ccf30 Merge pull request #1537 from assimp/Anatoscope-ObjExporter_nomtl b7bd006304 Merge branch 'master' into ObjExporter_nomtl eeee744e21 Merge pull request #1536 from assimp/Anatoscope-fix_trivial_warnings 4dab6f9be3 Merge branch 'master' into Anatoscope-fix_trivial_warnings 4910af3814 Merge pull request #1535 from assimp/kimkulling-patch-1 9a721d0ef4 Update .travis.yml 4587e63e2f Merge branch 'master' into fix_trivial_warnings 56674de1d8 Merge pull request #1534 from Matter-and-Form/texturefile-int-name-fix 2922753589 Return early when element is TextureFile c86c7b4518 Update .travis.sh d279a3cc02 Merge branch 'master' into fix_trivial_warnings 5b76a31485 fix trivial warnings 931542bf3c Merge branch 'master' into ObjExporter_nomtl c666a05e16 Merge pull request #1524 from Matter-and-Form/invalid-texture-coordinates-cleaning-fix ce7f379aa3 Merge branch 'master' into invalid-texture-coordinates-cleaning-fix 62e3ac9b4d Merge pull request #1525 from daeyun/daeyun-lib-dirs bf9d319489 Update helper.py e52e44ea07 Formatting cc4531459f Set mNumUVComponents to 0 when deleting texture coordinate sets 938c02a358 Merge pull request #1523 from assimp/issue_1490 8be196f77d closes assimp/assimp#1490 : fix invalid access to mesh array when the array is empty. a502560da1 Merge pull request #1520 from assimp/issue_1514 af4556d569 only scale the root node because this will rescale all children nodes as well. 64ee21024b Add missing file. ae020281e2 Add unittest 711050de8a fix frame pointer arithmetic 4d09e61b13 Merge branch 'master' into master 99b9ba4c11 Merge branch 'master' into master aca8f068d0 Update ColladaExporter.cpp bbeb9dd640 Use correct lookup if scaling is enabled. d6f5ad66b2 closes assimp/assimp#1514: add misisng flag to enable global scaling. f49de6ecfe closes assimp/assimp#1514: add postprocess step for scaling c1c4a5ed2a Add two unit tests for OBJ importer 89d198399c Merge pull request #1516 from Matter-and-Form/gltf2-export-roughness-from-shininess-fix a6688243a7 [ObjExporter] add a test for the "no mtl" version of the obj exporter 18cef9b391 [ObjExporter] add a "no mtl" version of the obj exporter 8b73ec7541 Fix shininess to roughness conversion; Add comments 92046319be Merge pull request #1503 from Matter-and-Form/gltf2-materials bfa33b50ad Merge branch 'master' into gltf2-materials 6d98f82440 Merge pull request #1512 from aavenel/safe_atoi_OBJ cc8374dd80 Return exception when obj file contains invalid face indice aa733d6f77 Merge pull request #1486 from autodesk-forks/adsk-contrib-fix-std-stream-overflow 90ba199ad4 Update ColladaExporter.cpp cd4ef0a2e9 Update ColladaExporter.h 8cf61c3c89 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 6e88838602 powf -> pow 40147d253d Prefer “BLEND” over “MASK” as an alphaMode default 89358458f0 Approximate specularity / glossiness in metallicRoughness materials a898c1f2d1 SpecularFactor import and export improvements c71790c78d Diffuse color and diffuse texture import and export improvements dbae8e497d Merge pull request #1502 from Matter-and-Form/bugfix/gltf1-version 5eaf083fbd Fix output of glTF 1 version string 130c25eadb Merge pull request #1501 from assimp/kimkulling-traviscleanup 832c1fcc7f Update .travis.sh 299c34f063 Update .travis.sh 4d30ae5436 Merge pull request #1500 from assimp/kimkulling-doc_path c49d12cabb Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 4354cce313 Update Readme.md 2f56560e3f Merge pull request #1497 from ihmcrobotics/feature/jassimp-classloader-license 00e13ccd77 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow b0c435a66e Merge branch 'master' into feature/jassimp-classloader-license 0b2d5de94f Merge pull request #1496 from aavenel/unitTestObj 85b1181486 Merge branch 'master' into unitTestObj d997ea961a Merge pull request #1499 from ihmcrobotics/feature/collada-up_axis-api-improvements 42e2c30b4b Added helper getters for casting metadata payloads 1aa15c8069 Fix header and remove old debug code 100fa76a90 Merge remote-tracking branch 'upstream/master' into feature/collada-up_axis-api-improvements ff758e4c15 OBJ : add unit test to validate relative indices 9d2bcb56c7 Merge remote-tracking branch 'upstream/master' into feature/jassimp-classloader-license 82debbf54a Fixed copyright notice for IHMC jassimp improvements to BSD. Updated README b2eb599176 Update ColladaExporter.cpp 44ad80201c Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 82b269c424 Merge pull request #1480 from turol/ubsan f8c4002294 Fixed a divide by zero error in IFCBoolean that was latent, but nevertheless a bug 9a6b141568 FBX: Replace bad pointer casting with memcpy 7cbb5f4d3b B3DImporter: Replace bad pointer casting with memcpy 7b73fe8b02 Travis: Add Clang UBSan build configuration 6efe4e2841 CMake: Add support for Undefined Behavior sanitizer 8e7f476490 Merge pull request #1494 from assimp/invalid_normals_in_unittest 1767663071 Merge branch 'master' into invalid_normals_in_unittest 5a15226a95 Merge pull request #1489 from ihmcrobotics/feature/jassimp-classloader f56e28ea3c UnitTest: use correct initialized normals in unittest. 5e739acfa1 Merge branch 'master' into feature/jassimp-classloader 01510dfe1b Merge pull request #1491 from assimp/fix_blender_overflow e662f2dc6f Blender: fix short overflow. 5e00d4d5cb Populate metadata on Java objects. a7c1dde56e Added return statement to Write 0229a3acf3 Added supported for custom IO Systems in Java. Implemented ClassLoader IO System 33a54f021e Fix small bug in getStaticField 00eb2e401a Added field and getter for metadata entries to AiNode.java. 3ef1f37a80 Create AiMetadataEntry.java for jassimp port. e79848ff79 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 114c48bbcf Merge pull request #1479 from jaredmulconry/appveyor 3e7dbb5dfb Merge branch 'master' of github.com:assimp/assimp into appveyor c3074a81ca Merge pull request #1464 from assimp/issue_1453 a1b79e23e6 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 8f141c1966 Update utObjImportExport.cpp c128e7e56c Merge branch 'master' into issue_1453 fa91a0f64c Another minor source change, this time even more minor than the last. Let's see what the cache can do with this. 1497cc27b2 Cleaned up the whitespace again. Let's see how the cache does. dce2be9e09 I think I've worked out where the obj's are located. We shall see if the cache picks them up. 94e3f903e2 Merge branch 'master' into appveyor bb173749c1 Attempting to fix the directories being cached. eb46a40849 Merge branch 'master' into appveyor b8ad03baa1 Because I have to change a file somewhere to properly test the cache on AppVeyor, I've made some whitespace a bit better. 63338c0605 Merge branch 'master' of github.com:assimp/assimp into appveyor ffaa42af79 Merge pull request #1482 from TransformAndLighting/master 7c8e8e04fa Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 7353d25c13 Prevent failing stringstream to crash the export process 469c1a068f Merge branch 'master' of github.com:jaredmulconry/assimp into appveyor d60fe38253 Merge branch 'master' into master 21add21ab1 Merge pull request #1484 from jaredmulconry/msvc2013_tempfile_fix b2716a9c3f Merge branch 'master' into msvc2013_tempfile_fix 55cfe298b0 Merge pull request #1483 from turol/warnings 4a915653f5 Fixed IOStream reporting a file size of 0 for files that have been written, but not yet been flushed to disk. f90d874978 Open3DGC: Remove redundant const qualifiers from return types cd64eae590 GenericProperty: Remove useless const qualifier from return value 7e033c6cef FBX: Remove useless const qualifier from return value 3b4ffbc1b6 Test failures are now getting properly reported. Turning off 'fast finish' to allow all tests to execute. d8e3952b64 Merging the test_script with test reporting was a terrible idea in retrospect. on_finish should serve the purpose. e60e396721 Attempting to address failures with chained batch and powershell commands. 61836080c5 Quote escaping across nested batch and powershell hurts my brain. 27b6cc22db No fun/multiline allowed. 022a34e54c Fixing multiline batch command weirdness. 54d2f25aa5 Attempting to get test results reporting even if an error occurrs. 5e5b7f4f75 Refined the appveyor config so that test output is reported even if tests fail. 5149149b07 The environment section doesn't do what I thought it would. Duplication is bad, but seems neccessary. 58ac747634 Fixed some bad usage of environment variables. 90c9884c5e The environment section uses different syntax for a list of vars. 81d3010f73 Added the mtime_cache script to hopefully improve use of incremental building with appveyor. Reduced the verbosity of the appveyor config. Added use of mtime_cache. Fixed the output of an xml version of the test output for hooking into appveyor. 52da099738 Updated test output to log to xml and to upload those results appropriately, so they show up in AppVeyor correctly as tests at the end. 6a2dfb1efc Fixed up the path to the build artifacts to be cached. 3e80aabde5 Attempting to get tests to run. 26851880e4 Attempting to address issues with cloning the repo. shallow_copy seems to fail at times. I'll let it continue to clone the whole history. b57011552b Merge branch 'master' into issue_1453 f925e2cf4e Reproduce issue and remove assertion when a nullptr makes more sence fe79322959 Attempting to get the tests detected and run. d3de8dbf5f Paths aren't what I expected for the test directory. Trying something else, with a testing call to dir to help track it down. ba43e3a152 x86 isn't a valid VS platform. Win32 it is, then. 4c06abf281 Replaced the worker image name, which doesn't work as generator name, with a manually created generator name. 75eb2ad071 Merge branch 'master' into appveyor 63764ae42a Apparently @ escaping batch commands doesn't work in this context. 8f54892439 Cleaned up appveyor setup, added VS 2017 to the build matrix and attempted to add running of tests. 8e8ed97750 Merge pull request #1478 from turol/travis 10b49dfd25 Travis: Remove old attempt at disabling default configurations 684cb88e83 Travis: Remove redundant config bd65811329 Travis: Rename TRAVIS_NO_EXPORT to DISABLE_EXPORTERS so its meaning is more obvious 69b8c1f60d Travis: TRAVIS_NO_EXPORT is now implicitly off, disable explicit off f2cf8bf075 Travis: Disable GCC AddressSanitizer build, Clang AddressSanitizer is strictly better ea58801a2d Travis: ENABLE_COVERALLS is now implicitly off, disable explicit off 7037fdfe2c Travis: ASAN is now implicitly off, disable explicit off 42142105fa CMake: Be more verbose about enabled options 54d14e6e3b Travis: Refactor how we build CMake options 5301768256 Travis: Remove unused LINUX env variable 9a79d243f9 added additional displacement texture token. cc562b2b1c Merge pull request #1477 from turol/clang 326158633b Fixed warnings on MSVC caused by implicit conversions from double to float. 50b43f76e1 OpenGEXImporter: Copy materials to scene b841ed194b OpenGEXImporter: Store RefInfo in unique_ptr so they get automatically cleaned up 775f984d99 OpenGEXImporter: Fix IOStream leak 22b55d01a2 OpenGEXImporter: Store ChildInfo in unique_ptr so they get automatically cleaned up 61278aa408 AMFImporter: Fix memory leak 1f16ed9fd0 UnrealLoader: Fix IOStream leak 1bee5b0025 utRemoveVCProcess: Fix memory leak 9eef4c16a8 utMetadata: Fix memory leak 9f5b58e706 Upgrade RapidJSON to get rid of a clang warning ae8a4c0c62 Fix warning about non-constant array size d28e88feb7 CMake: Remove OpenMP stuff, it's unused and breaks Travis clang build 5cc316b874 Travis: Treat warnings as errors, without typos this time a3053eb358 Travis: Build with clang too 8ef219b985 Merge pull request #1476 from assimp/revert-1471-clang c1f93a69ae Revert "WIP: Enable Travis clang build" 4a9ab98240 Merge pull request #1474 from jaredmulconry/issue_1470 c9b9dab1ff Merge pull request #1475 from jaredmulconry/master b360838ef6 Merge pull request #1471 from turol/clang 3803a5181c Fixed warnings on MSVC caused by implicit conversions from double to float. 341222697a Address warnings on Clang 3.9 caused by having a static data member in a class template. 3f0bb9c634 OpenGEXImporter: Copy materials to scene 568003a0d3 OpenGEXImporter: Store RefInfo in unique_ptr so they get automatically cleaned up e7ff7b167f OpenGEXImporter: Fix IOStream leak b6d2b91799 OpenGEXImporter: Store ChildInfo in unique_ptr so they get automatically cleaned up 316046f748 AMFImporter: Fix memory leak 34acf47acd UnrealLoader: Fix IOStream leak 674fb5a46c utRemoveVCProcess: Fix memory leak 9bcfce63dc utMetadata: Fix memory leak 65547d5760 Upgrade RapidJSON to get rid of a clang warning afce984228 FBXImporter: Add explicit instantiation of log_prefix so other FBX source files can see it bf1aaf98f9 IFCImporter: Add explicit instantiation of log_prefix so IFCMaterial.cpp can see it e7c112916b Removed unnecessary files from zlib contribution a824b79508 Merge branch 'master' of github.com:assimp/assimp into issue_1470 1ef3b0f3f3 Fix warning about non-constant array size 452885672e CMake: Remove OpenMP stuff, it's unused and breaks Travis clang build 9eeece1b35 Travis: Treat warnings as errors, without typos this time f6706f3532 Travis: Build with clang too cbca8f574e Merge pull request #1432 from turol/asan 2a7f975613 Merge pull request #1469 from turol/warnings bab6ca2085 Upgraded zlib to 1.2.11.1 from the develop branch. 3964f5cf43 Update .gitignore c3e9d6132c Merge pull request #1468 from assimp/issue_1467 b5db7d3649 Disable warning 4351 on MSVC 2013 003c728daf appveyor: Treat warnings as errors 799f0a3ac8 Fix warnings-as-errors flag on MSVC 5804667dbb Addressed some mismatched news/deletes caused by the new glTF2 sources. 1eb7eceddf Addressed a number of memory leaks identified in unit tests by asan 29e46e4bb8 Addressed asan failures caused by misuse of APIs within unit tests. 1095ec454b Fix delete / delete[] mismatches in glTF2 importer efd861253d Fix delete / delete[] mismatches in MakeVerboseFormat da96b32fb9 Fix out-of-bounds read in MaterialSystem unit test 5ecab20bd0 Fix delete / delete[] mismatch in glTFAsset fff800f9ab Enable AddressSanitizer for Linux clang build 4652b66bb5 Add AddressSanitizer option to CMake 6ec25be0a6 OpenGEX: improve logging to be able to detect error-prone situations. 3f4663e369 closes assimp/assimp#1467. c202d43d8f Merge pull request #1466 from jaredmulconry/issue_1330 94860ff66e Merge pull request #1465 from turol/warnings f7b2380f86 travis: Treat warnings as errors 77ce6e562d Fix CMAKE option name 45d93701f8 Open3DGC: Fix some uninitialized variable warnings 9088deeb1d Eliminated all warnings under clang with default settings. One remains in the included zlib contrib project. a9e8836271 Added -fPIC flag to C compilers for GCC and clang. Removed -pedantic flag from some compilers. c4e91eb33f add some asserts. 2056e56bdb Obj: prepare test to reproduce crash on linux. 1c76962c98 closes assimp/assimp#1450: use correct name of exporter to gltf2 9033071237 Obj: rename attribute from exporter. 5adc029225 Merge branch 'master' of https://github.com/assimp/assimp c42589460d closes assimp/assimp#1459: fix out-of-boundary access error 6ae35fb4d1 Merge pull request #1462 from jaredmulconry/issue_1330 d28f45bfa8 Merge branch 'master' of github.com:assimp/assimp into issue_1330 87546ec54c Merge pull request #1461 from jfaust/master 4feac1b1f9 Changed a couple more function interfaces to correct the input type. 12b6895f7b Replaced unsigned long for the crc table to z_crc_t, to match what is returned by get-crc_table febd611d48 Fix glTF2::Asset::FindUniqueID() when the input string is >= 256 chars e77e89c8b7 Improved the naming of temporary file generator function. Replaced use of tmpnam in utIOStreamBuffer with this facility to addresssafety warning. 980d2b0eee Added a header to hold the file generation code for unit testing purposes. d0ca143a3b Merge branch 'master' of github.com:assimp/assimp into issue_1330 e2ab3e0d29 Changed the method by which temporary files are created for unit the FileSizeTest. Will apply to other tests next. b1410f8455 Merge pull request #1457 from jaredmulconry/issue_1330 4360267cb2 Replaced flakey macros with specific functions to serve the purpose f6fc5a7a11 Changed the FileSizeTest to not rely on tmpnam to eliminate warning on gcc. 7e91ac3443 Suppressed warning on gcc caused by the 'visibility' attribute being ignored on types. 79a5165106 Fixed unused variable warning by replacing them with descriptive comments 8dabd76e03 Fixed a warning caused by aiVector3D appearing in a packed struct, causing it to fail to pack as requested. 539410d033 Fixed an error when compiling samples under MSVC that was caused by assuming including windows.h would pull in shellapi.h 059a32654e Addressed warnings generated on MSVC across x86 and x64. b5ac248703 Merge pull request #1444 from turol/warnings 81b94a1dca Merge pull request #1445 from Matter-and-Form/gltf2-alphaMode-fix 5c44776532 Merge pull request #1447 from Matter-and-Form/gltf1-color-import-fix adec1b2175 Merge pull request #1446 from Matter-and-Form/feature/gltf2-primitives d27e667f1e Merge branch 'master' of https://github.com/assimp/assimp af9596674d FBX: add missing inversion of postrotation matrix for fbx. 3e8955faf5 Don’t ignore rgba(1,1,1,1) color properties 798542d7bd Formatting de0bf2ea96 Fix alphaMode storage and reading 8743d28ec5 SImplify mesh merging code 2efd2cdef8 tweaks to primitive merging logic; comments + formatting 814e8b3f8e Formatting 28523232cf Merge multiple meshes in a node into one mesh with many primtives; write out only one mesh per node 5147acfe65 Revert "store node mesh vs. meshes" d473a49456 Merge pull request #1442 from jcowles/master 982430c3ce BlenderDNA: Silence warning about inline function which is declared but not defined 40c308af44 glTF: Silence uninitialized variable warning b74fc9495a PlyLoader: Fix operator precedence issue in header check 4652be8f18 FIReader: Silence uninitialized variable warning 41724ace2d Collada: Silence uninitialized variable warning c207e74534 Fix glTF 2.0 multi-primitive support 702bc6358e Merge pull request #1441 from turol/travis 69f8dc9b31 Travis: Disable OS X build since it doesn't do anything currently 62db02210a Merge pull request #1440 from turol/travis d34895bf2c Merge pull request #1435 from jaredmulconry/issue_1065 484f73b179 Merge pull request #1437 from rmitton/sib-version cf8453a21a travis: Enable ccache 798d2d063c travis: Only build with xcode 8.3 167fb7e250 travis: Correctly minimize build matrix 5478d4d4c7 travis: Move os declarations earlier a77cbcf096 Merge pull request #1436 from turol/warnings f602055da5 Added Silo 2.5 support 234ffc0ad6 Fixed truncated material names 2ab72816fb Merge pull request #1 from assimp/master 01c50394ce FBXParser: Silence uninitialized variable warnings f1998d52dc Importer: Whitespace cleanup to fix GCC misleading indentation warning 046c229e48 AssbinExporter: Fix strict aliasing violation f4a0ab81b1 AssbinExporter: Add Write specialization for aiColor3D b9efc234d0 DefaultLogger: Whitespace cleanup to fix GCC misleading indentation warning 0b140db0a4 glTFExporter: Silence uninitialized variable warning f2e2f74d73 Add CMake flag to treat warnings as errors 94a6fc78f4 Addressed last remaining warning under MSVC caused by use of 'deprecated' fopen. dce39fdf43 Merge pull request #1433 from vkovalev123/patch-1 58213804ff Update 3DSLoader.cpp b9cfff8fac Merge pull request #1431 from assimp/revert-1427-asan afd6c4d57d Revert "Asan" d139b4d180 Merge pull request #1423 from Matter-and-Form/feature/gltf2 d49f86f1e7 Merge pull request #1427 from turol/asan 2cc0a378ed Update glTF in list of importers and exporters b6f122ff2c Fix delete / delete[] mismatch in glTFAsset 2938a259b8 Enable AddressSanitizer for Linux clang build 6a3b030094 MDP: fix encoding issues. b5f770e456 Merge branch 'master' of https://github.com/assimp/assimp e3163ec15e FBX: fix some minor findings. cbedc448c6 closes assimp/assimp#1426: add Defines.h to include folder for install. 190f034e38 Add AddressSanitizer option to CMake 933bbb4f1c Manually read alphaMode material property eca008d5ec Properly move string passed to JSON writer b0da0796c8 Fix Segfault caused by losing pointer to std::string 023cb27784 Revert "Remove simple gltf2 export unit test" 4b01ecaf10 Remove simple gltf2 export unit test 86a8a58d12 Exclude glTF2 Exporter test when ASSIMP_BUILD_NO_EXPORT cde29c937c Formatting b1a5ca4516 Use `forceNumber` argument of `WriteAttrs` to write correct attribute names, instead 990fe143a1 Fix mesh primitive’s attributes’ names 816e6909ca Remove KHR_binary_glTF code b4f5033d89 Remove compresssed file format flag ed2b699c4b Add gltf2 basic unit test d518289e72 more specific token search for Collada Loader 5cb13aa4b3 Load gltf .bin files from correct directory a438ece655 Remove premultipliedAlpha from gltf2 140b903d7a Fix parsing of glTF version Handle version as int in gltf Fix format specifiers in glTF version parser 19876e9822 Add support for importing both glTF and glTF2 files 2ee7991558 Restrict search for OFF header to first 3 bytes a5e8e0b2bd Remove commented out code 0a8183531e Set alphaMode, baseColorFactor opacity when model’s opacity isn’t 1 37582131f4 Set the metallicFactor to 0 if source file doesn’t have metallicFactor da6a252efb Fix METALLIC_FACTOR typo 3ba00ca421 Define gltf material property names as constants 54dd4804cd Fix indentation 44757af34a Implement pbrSpecularGlossiness property as Nullable 03cfa04ee4 Define default material values as static constants 1a5823700f Remove need for Has by returning an empty Ref in Get 21259e0835 Use different form of index accessor 37527849b7 Export material names properly a9c4fa84b5 Sampler improvements; Add new LazyDict method 7245cceead Set default values on Sampler 2abdbdb55e Fix unused CopyValue 63ef19d9ad Export extensions d277995a97 Formatting 7f01e3f48f Only export byteStride if not 0 a0d97505e5 store node mesh vs. meshes ab08a7c3cb reenable animation and skins exports f09892ab63 Write specularGlossiness textures on the specularGlossiness object feee7528d6 Make sure `on` flag for specularGlossiness is being persisted 8bef546b41 mention pbrSpecularGlossiness support 2d54019b8f Remove OPEN3DGC and compression references 562920fbb8 Changes to GLTF2 materials 7532d6aac1 Remove Light, Technique references 863458cd4a Start removing materials common, and adding pbrSpecularGlossiness 7615a97cd3 Remove redundant function 0cf69479c3 Use `!ObjectEmpty()` vs. `MemberCount() > 0` 11cb9ac139 Working read, import, export, and write of gltf2 (pbr) material 6b4286abf6 check in gltf2 models to test directory Remove un-needed test models b42d785afe Start managing and importing gltf2 pbr materials 67eb3b0608 temporarily disable gltf exporting of animations and skins 39172feb3e Start reading pbr materials 4d59dee5ea Cache retrieved items via an original index map 47c7c3cf50 Disambiguate Get methods f814acf33a Update glTF2 Asset to use indexes 63d3655f1b Duplicate gltfImporter as gltf2Importer; Include glTF2 importer in CMake List f7d39cfa71 Merge pull request #1425 from jaredmulconry/issue_1065 3c1cda0b8c Merge branch 'master' of github.com:assimp/assimp into issue_1065 698cd5826d Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. dfd109e640 Merge pull request #1424 from samitc/feature/fix-mesh-name-lost-with-PreTransformVertices-flag e40cd6c13c Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 1167edaeca Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 6db0a63d6e Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 6e02bcd8d6 Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. b7f1277175 Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 98532b45bf Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 97b67d5cb5 Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 39e5b919ca Merge pull request #1422 from elect86/patch-9 2ec46cc188 fix name lost in mesh and nodes when load with aiProcess_PreTransformVertices flag c2baa0f59d Added a link to pure jvm assimp port dbde54b4f7 Merge pull request #1421 from assimp/issue_1404 e4c1557561 Traivis: make build amtrix smaller. c143d2e02c closes assimp/assimp#1404: set name with merged meshes for output mesh. ee56ffa1f1 Merge pull request #1418 from umlaeute/debian-fixes-4.0.1 eb0ace4e18 exclude repository-settings from source-package generated via 'git archive' 042597552a split setup.py into multiple lines 3de9bbb73d fixed spelling error f8146e4da2 fix the buil 2df704edef fix the buil 82f0dae835 FIx build 11f70e2140 Tests: add 3D-importer test. b4da9c4f56 Fix review findings: remove unused includes 00e3b03c5b closes assimp/assimp#1406: fix merge issue + improve 3MF-tests 4f2fcf306e Merge pull request #1410 from THISISAGOODNAME/master 1e3a9ded11 Fix assimp_qt_viewer build failed on OSX fd9da14db7 Merge pull request #1408 from assimp/acgessler-patch-4 f8ef94095a Update version check in FBX reader to check for version >= 7500 instead of exactly 7500. 43a51df7ec Merge pull request #1405 from assimp/rickomax-master 7151cf117b Merge branch 'master' of https://github.com/rickomax/assimp into rickomax-master ce9c8a4efc Merge pull request #1403 from kebby/fbx_anim_fix c6360ba1ab Merge pull request #1401 from melMass/python3 12a28d33ce FBX importer: try a constant again (ll suffix this time) 9a12b6ef0b FBX importer: Back to INT64_MIN but include <stdint.h> also. cac93ad0a8 Merge pull request #1400 from kebby/master 80489963a1 FBX importer: don't rely ont INT64_MIN / ..MAX macros e90c615c27 Update Readme.md 7182f89a51 FBX importer: Use actual min/max of animation keyframes when start/stop time is missing 3a89e36718 Merge pull request #1399 from m4c0/master 3fef573a45 Merge pull request #1398 from Eljay/fix-irrxml 37f5619149 created a python3 version of the 3dviewer and fixed the / = float in py3 92beee9924 Collada importer: Add support for line strip primitives 2e5e56c000 Re-enabling PACK_STRUCT for MDL files. d0d45d1d22 Fix linking issue with irrXML 91f6a9a721 Readme: add TriLib to the official list of supported ports. a71a61f260 Merge pull request #1397 from Arshia001/master e0fc412e57 Fix OBJ discarding all material names if the material library is missing 6b4e3177e8 Merge pull request #1385 from gongminmin/FixForVS2017.3 b26fea4cf5 Fix compiling problems under VS2017.3. 1. WordIterator's operator== and operator!= must take const WordIterator& as parameter type. 2. OpenMP doesn't work with new two phase lookups. Need to disable twoPhase. dab0985994 assert: remove assert with more than one statement and use only ai_assert. 974eb669c8 Merge pull request #1383 from jeremyabel/patch-1 7861c359ba Added wiki link to C4D file format f78614d33e Merge pull request #1382 from jeremyabel/master b1313b04b8 should be map, not set 847e0291a0 changed a few leftover asserts to ai_assert 0629faf9b1 Merge pull request #1378 from dhritzkiv/feature/gltf-version 5b3b80cbc2 Formatting 83bfa61f8d version in glb header is stored as uint32_t 7a4a32625c Ensure gltf asset version is printed as d.0 7fd9c3dc98 § 1a2c69fda8 Merge branch 'master' of https://github.com/assimp/assimp c3cd7349d0 unzip: latest greatest. 8091e46e81 Merge pull request #1370 from 0xcccc/master 267d3f41e8 ply-loader: add brackets. ba658e7813 ply-importer: fix creation of vertex attributes. 8478df7dbd PlyLoader: fix vertex attribute lookup. def42bf624 Fix android build issues 81fd027860 closes assimp/assimp#1270: use HasTexture for texture coordinates. 232954c15e cmake cleanup. 919f2a1ea9 Commandline tool: fix url to project space. 36425677c7 Merge pull request #1365 from ihmcrobotics/feature/custom-library-loader 3c56117e4f Merge branch 'master' of https://github.com/assimp/assimp 5fe45a1aa3 Readme: update list of supported file formats. 44e2ba541f Merge pull request #1363 from jamesgk/gltf2 efa0aaf729 Merge pull request #1364 from pdaehne/master 1e99228861 Merge pull request #1366 from titorgalaxy/master 7557fdbb72 Fix install for builds with MSVC compiler and NMake. ab9dda594d Added return statement to Write be787f5c6c Added supported for custom IO Systems in Java. Implemented ClassLoader IO System 5939d81138 glTF2: Use better mipmap filter defaults 21391b1f74 Added javadoc for the JassimpLibraryLoader c91e9a94da glTF2: export materials' normal maps c4d0567a8a Provided access to the library loading code to allow custom library loaders b7b17b03ec glTF2: use opacity for diffuse alpha + alphaMode acf8c54e55 glTF2: Fix animation export 8243b01c06 Added missing include to stdlib.h and remove load library call 16ed8861eb X3D importer: Workaround for buggy Android NDK (issue #1361) bb55246c18 Export glTF 2 d7cbbaf23e Compile with glTF2 export option (currently same as glTF1 output) 38626d4260 glTF: start fork of files used in export, for glTF2 147541ab7f Complementing last fix 3d4b54f8fc Fixed FBX 7500 Binary reading REVERT: 2531d2226c Update CMakeLists.txt and config.h for assimp 4.0.1. REVERT: de5cf2635b For CI - suppress all the 3rd-party libraries' warnings. Somehow after bumping up the CMake minimum version, CMake configures Xcode to work "better" with xcpretty that now the warnings are piping through the xcpretty's filter. Unfortunately when performing CI build, this is undesirable because not only now the log size is swelling, the build is slower too. REVERT: 4fd12ed012 Updated Assimp to v3.2 REVERT: 834b24a33a Remove unused files/directories. git-subtree-dir: Source/ThirdParty/Assimp git-subtree-split: 77ade9603da501a4e1a8df133c1416ebab9b25ee
weitjong
added a commit
that referenced
this issue
Mar 15, 2018
9e74b56823 Modify Assimp's build script to integrate with ours. cb31a7cf82 Remove unused files/directories. 80799bdbf9 Merge pull request #1631 from assimp/kimkulling-410_prep e8139ef515 Update utVersion.cpp 65d29c5420 Update CMakeLists.txt 406a06705e Update Doxyfile.in 28b01cbdd1 Update to 4.1.0 899748c651 Merge pull request #1627 from assimp/kimkulling-patch-2 0c2f4abe78 Update CREDITS bd8d3025bd Merge pull request #1622 from assimp/fix_model_xml_3mf 972d8517b5 fix the model xml 3d4256a7a7 Merge pull request #1620 from assimp/issue_1619 0588d6cccf FBX: closes assimp/assimp#1619: return correct index for embedded textures. 26cdec5633 Merge pull request #1618 from assimp/3mf_export_fixes c23c63e821 fix correct folder naming scheme. 95e9cd75fa 3MF: fix working test for 3MF-export. d3833fe804 Merge pull request #1611 from assimp/kimkulling-patch-2 36cddcc8b7 Update miniz.h fe6608175b Update miniz.h a59f0b29d5 Merge pull request #1604 from assimp/kimkulling-miniz-memoryaccessfix 98cb898463 Merge branch 'master' into kimkulling-miniz-memoryaccessfix b92c3ca161 fix invalid op 75b31377fc Merge pull request #1606 from elect86/patch-16 b8ab90ae4b Merge branch 'master' into patch-16 ed361f0b53 Merge pull request #1608 from turol/analyze 45f2f31011 miniz: Remove some dead assignments 26f749fcd2 Re-enable Clang static analysis 5702b907d4 Merge pull request #1607 from turol/unique_ptr 2c3558fdd0 Remove ScopeGuard b60d84a8a2 C4D: Replace ScopeGuard with std::unique_ptr bd4f024562 XGLLoader: Replace ScopeGuard with std::unique_ptr e8eccfa27d FBX: Replace ScopeGuard with std::unique_ptr 6f50be82aa 3MF: Replace ScopeGuard with std::unique_ptr f35d5952dc BlenderLoader: Replace ScopeGuard with std::unique_ptr af8e297e0f BaseImporter: Replace ScopeGuard with std::unique_ptr 42c1c733b9 Update MD3Loader.cpp 77b0aa4f4b Merge pull request #1602 from Matter-and-Form/fix/multibody-binary-stls 2897433358 Update miniz.h 4811c0bdd1 Merge branch 'master' into fix/multibody-binary-stls 4fe91f7a5b Merge pull request #1598 from assimp/export_3mf 5822d1920e Update STLLoader.cpp 915ee95ad3 Fx nullptr dereference. 5aa84a2610 Merge branch 'export_3mf' of https://github.com/assimp/assimp into export_3mf ac23034816 fix the exporter unittest when the export is disabled. c27fda62e5 Merge branch 'master' into export_3mf 9be69a90b1 Merge branch 'master' into fix/multibody-binary-stls 9d224f6ac5 Merge pull request #1603 from Matter-and-Form/fix/gltf-node-name-conflict 46caecdf35 enable compiler switch test for no exporter requested. 98e98dc40c Fix node names sharing same name 5c9ed540b2 Add test for GLB import 67c236647d Restore import of multi mesh binary STLs 59dcfefeb2 fix unaligned memory access. fd2da59427 fix unaligned memory access. b5e79c3cb6 fix invalid include ddd23fad3f Merge branch 'export_3mf' of https://github.com/assimp/assimp into export_3mf e442f5838f Merge branch 'master' into export_3mf e17f7010d1 Merge pull request #1599 from assimp/kimkulling-verbose-analyze ef4842e128 Update .travis.sh 6a2cd1c91d Update D3MFExporter.cpp 9bd9b3d99c Merge branch 'master' into export_3mf e6381b7616 Merge pull request #1594 from Matter-and-Form/fix/gltf2-transforms 4b6e49ca7b Update D3MFExporter.h 4f972661e8 Update D3MFExporter.cpp 7a395e274f Merge branch 'master' into fix/gltf2-transforms 3e9bb23688 Merge pull request #1595 from Matter-and-Form/fix/gltf2-preserve-node-names 8ce5985aa0 Merge branch 'master' into fix/gltf2-preserve-node-names 890920110c Merge pull request #1596 from Matter-and-Form/feature/gltf2-tangents 09f7769820 remove unused attribute. 8e413ac1e3 Merge branch 'master' into export_3mf 7280dec838 fix unittest. 3dfca3bc84 3MF: add export to a given archive. 0031165789 Add support for tangents in glTF2.0 import 0b04ae1d91 Preserve node names when importing glTF2.0 e53d4735b0 Fix transform matrices multiplication order per glTF2.0 spec 0ce3641deb Merge pull request #1589 from aavenel/fix-typo-gltf 623b5a515a Merge branch 'master' into fix-typo-gltf 44b38263a5 Merge pull request #1590 from aavenel/fix-cmake-unit-win b9845285ca Merge branch 'master' into fix-cmake-unit-win a41bef0d54 Merge pull request #1591 from aavenel/fix-warnings-win eb452b28a2 Fix warning on MSVC14 d529dd17f9 Fix warning cast double to float 273f6b0267 Fix MSVC14 warning cast double to real f80e8b39a1 Fix warning C4138: '*/' found outside of comment on MSVC14 c63263b025 Fix typo on gltf2 camera parameters d8d5cf1a2d Copy assimp dll to unit folder on windows 6c59c83e0f add missing include 0bdb375804 Add missing file export into archive. 09a5946dbd Prepare archive structure. 35819340aa Merge pull request #1588 from elect86/patch-15 ad2223f1c5 Merge branch 'master' into patch-15 a1c1ad74bd Merge pull request #1582 from mrautio/master fdb52723c4 Update Readme.md d180cfcba5 Merge branch 'master' into master ed4e6b0db0 Merge pull request #1580 from assimp/scene_combiner_crash e35f789ace Merge branch 'master' into scene_combiner_crash ac37977230 Merge pull request #1575 from elect86/patch-12 454b8919b0 use one header for all xml-tags. 6da4258206 Merge branch 'master' into patch-12 a2ba3d630d Merge pull request #1586 from turol/validate b474e75e29 3Mf-Export: add prototypes for relations and rest of 3MF-document. 127705d347 Unit tests: Enable data structure validation in cases where it doesn't cause failures a7be5b527f add missing return statement. 9ca7b00280 Merge branch 'master' into export_3mf c22b4acd47 3MF: Export initial commit. 70d9df868d Merge branch 'master' into patch-12 4cf8e10235 Merge pull request #1585 from pdaehne/master ba3acd7459 Merge branch 'master' into patch-12 a05d74a281 [glTF2] Moved byteStride from accessor to bufferView beff88228d Merge branch 'master' into master 4502d72ee6 Merge pull request #1584 from pdaehne/master 6cbfd5b977 [glTF2] Implemented reading binary glTF2 (glb) files 9f1dce8e57 Merge branch 'master' into master 4fb5038fb1 Add support for building Mac OS X Framework bundles 2a9f79f958 check for 0 properties before copy them 55c9761228 Merge branch 'master' into patch-12 9707fde709 check for nullptr dereferencing before copying scene data e1837b6cc8 Merge pull request #1576 from elect86/patch-13 65d6daa414 Merge branch 'master' into patch-13 b408e25a1d Merge pull request #1579 from assimp/fix_android 1a1d96d3e2 Merge branch 'master' into fix_android a8e65a1e8a Fix android build. 864a080b45 Merge pull request #1578 from turol/warnings 8ae7231654 Blender: Silence warning about uninitialized member 2c8cc1f732 BlenderDNA: Silence warning about uninitialized member bcffa28a33 MDLImporter: Don't take address of packed struct member 10f4b6f95c assimp_cmd: Fix strict-aliasing warnings 53119e74f8 Open3DGC: Fix strict-aliasing warnings 1067ae4bfa FIReader: Fix strict-aliasing warnings c1515db56f Blender: Fix strict-aliasing warnings 40bb3f3d0f Unit test: Fix signed/unsigned comparison warnings 3e78bd51d4 Merge pull request #1577 from elect86/patch-14 703d046fd9 Update ValidateDataStructure.cpp fc360b9cc8 Update ValidateDataStructure.h b428c66f39 Update ValidateDataStructure.h fb9a5950fd Merge pull request #1569 from assimp/issue_1513 07a99e0843 Merge branch 'master' into issue_1513 fae198ebfe Merge pull request #1572 from elect86/patch-11 d9965f6220 Update Importer.cpp 98da53e66a Merge pull request #1498 from turol/analyze 7db10022e9 closes assimp/assimp#1513: fix assimp for cross compile for android 983e52e308 unzip: Remove dead assignment 76de3e0828 clipper: Add assertion to silence a static analyzer warning c248ae3797 unzip: Remove dead assignments 9b88715361 unzip: Bail on bad compression method 0bc259fd95 unzip: Fix possibly uninitialized variables 11fdaa31bc clipper: Add assertion to silence a static analyzer warning fc59f190ae OpenDDLExport: Reduce scope of a variable ef91211231 OpenDDLExport: Remove dead variable be1d346c28 Open3DGC: Add assertions to silence static analyzer warnings 58d5d04e82 OpenDDLParser: Remove dead assignment 635a515e69 OpenDDLParser: Fix another potential memory leak eb5f47f5c5 OpenDDLParser: Fix potential memory leak 9dadec7736 assimp_cmd: Add assertion to silence a static analyzer warning f475803f93 X3DImporter: Add assertions to silence static analyzer warnings 66c18cc406 TerragenLoader: Remove unused variable e47bf932e8 SIBImporter: Add assertions to silence static analyzer warnings 583d3f88b8 FBX: Remove dead assignment ef0af40f90 IFC: Remove dead code b49a4e1338 PLY: Remove dead assignment and reduce scope of a variable 97843f19d2 OpenGEX: Add assertion to silence a static analyzer warning f470b8466f GLTF2: Fix signed/unsigned warning f90019bc1e NFF: Add assertions to silence static analyzer warnings 3f299b2a2b NFF: Split up some complicated assignments d24e0d44b2 Raw: Fix misleading indentation warning 2b93a210c9 NFF: Reduce scope of a variable 940449d837 LWO: Reduce scope of a variable a276a02726 IRRLoader: Fix confusing boolean casting 437816fc33 AssbinExporter: Add assertion to silence a static analyzer warning 4c9f169109 ASE: Add assertion to silence a static analyzer warning 856d402b59 AMFImporter: Add assertion to silence a static analyzer warning 2c7770eed5 AMFImporter: Add a block bd0d47c5fc Whitespace a7fccf8f33 OptimizeGraph: Fix possible null pointer dereference c51b92cfa3 RemoveRedundantMaterials: Add assertion to silence a static analyzer warning 95f2319b41 ImproveCacheLocality: Add assertion to silence a static analyzer warning c774e864a0 Remove some dead assignments 266e3b29a8 RemoveRedundantMaterials: Set pointer to nullptr after deleting it 35907e3446 Travis: Disable unit tests in scan-build config 59d1a1d819 Travis: Move slower builds earlier to improve parallelization 76919e87ea fast_atof: Silence some uninitialized variable warnings a15bfceb7e Travis: Add static analysis to build 80ba6d10f7 Merge pull request #1567 from assimp/fix_android_build c15c96ac76 CMake: use define for D_FILE_OFFSET_BITS only for not-android systems. 98a1b7671d Merge pull request #1558 from assimp/issue_216 24b728b3ea FindDegeneratives: adapt unittests and add configs 9206d1b62b Merge branch 'master' into issue_216 b2b671d8ad Merge pull request #1563 from assimp/fix_buggy_excape_sequence d0ac06cbfd fix buggy escape sequence. 9756b48bca Merge pull request #1560 from assimp/source_groups_for_ut 005b537324 unittests: add VS-based source groups for the unittests. 248e26ca03 Merge pull request #1557 from Matter-and-Form/gltf2-mesh-export-fix de1ec4ee5d Merge branch 'master' into gltf2-mesh-export-fix f0bed87e07 Merge pull request #1559 from luzpaz/misc-typos 12dbbd4ce9 Misc. typos ad2ff9fd71 check for area test if the face is a triangle. 30e06f7437 closes assimp/assimp#216: check the area of a triangle to check if its degenerated or not. 9ec117d0bc Fix export of deleted meshes; Add LazyDict::Remove method 9a13bf236f Merge pull request #1556 from assimp/issue_1292 5bc4e73727 Merge branch 'master' into issue_1292 bd104bda3b Merge pull request #1555 from assimp/issue_1315 ab639a71ae Merge branch 'master' into issue_1315 36475bf868 closes assimp/assimp#1292: export class subdivision cdfd4b9702 closes assimp/assimp#1315: check in exporting against out-of-bounds-access . 191454671d Merge pull request #1511 from eevictor/master 6954c7d75b Merge branch 'master' into master fe55bc9996 Update ColladaExporter.cpp c11a93e73c Merge pull request #1552 from assimp/issue_1251 6b826fecfd Merge branch 'master' into issue_1251 f41ed2f41f closes assimp/assimp#1251: use correct lookup for utf32. 792523ce90 Merge pull request #1551 from larsjsol/md2_fix 29cf414468 Merge branch 'master' into md2_fix a88a23ac7c Merge pull request #1549 from assimp/issue_104 75fdd25b6b Merge branch 'master' into issue_104 da7ce89ff2 Update STLLoader.cpp b87e7643d2 Update STLLoader.cpp 4ff2592747 Update STLLoader.h 26171a7949 SLD: add test model and a unit test. 9a9f18bbed closes assimp/assimp#104: deal with more solids in one STL file. 10a6524300 Merge pull request #1545 from assimp/issue_213 a77d9d7b21 Merge branch 'master' into issue_213 e09349c734 Merge pull request #1544 from assimp/issue_1526 4a4f3fddc7 closes assimp/assimp#213: log an error instead of letting the fbx-importer crash. 6b04b20869 closes assimp/assimp#1526: use correct include folder for assimp. b0e86d281b Merge pull request #1543 from assimp/issue_1533 5922200ec3 Merge branch 'master' into issue_1533 9835d28f72 Merge pull request #1542 from assimp/UnitTest_X3D f43586305c closes assimp/assimp#1533: put irrXML onto exclucde list for doxygen run. ab3cf3687c Merge branch 'master' into UnitTest_X3D 770f531cc6 X3D-Importer: add missing file. 2929a27edc add unittest for x3d-importer. 1e9919ce81 Merge pull request #1541 from assimp/issue_1351 02b042d78e closes assimp/assimp#1351: use correct name for obj-meshname export for groups. abca0a79f3 Merge pull request #1538 from assimp/aavenel-unittest_obj_importer a33e115fd1 fix mem-lead: face will be not released in case of an error. c9ada44ab5 Fix memory leak in case of an error. 4879fe13ca Merge branch 'unittest_obj_importer' of https://github.com/aavenel/assimp c700c08fa5 Merge branch 'master' into master d5692ccf30 Merge pull request #1537 from assimp/Anatoscope-ObjExporter_nomtl b7bd006304 Merge branch 'master' into ObjExporter_nomtl eeee744e21 Merge pull request #1536 from assimp/Anatoscope-fix_trivial_warnings 4dab6f9be3 Merge branch 'master' into Anatoscope-fix_trivial_warnings 4910af3814 Merge pull request #1535 from assimp/kimkulling-patch-1 9a721d0ef4 Update .travis.yml 4587e63e2f Merge branch 'master' into fix_trivial_warnings 56674de1d8 Merge pull request #1534 from Matter-and-Form/texturefile-int-name-fix 2922753589 Return early when element is TextureFile c86c7b4518 Update .travis.sh d279a3cc02 Merge branch 'master' into fix_trivial_warnings 5b76a31485 fix trivial warnings 931542bf3c Merge branch 'master' into ObjExporter_nomtl c666a05e16 Merge pull request #1524 from Matter-and-Form/invalid-texture-coordinates-cleaning-fix ce7f379aa3 Merge branch 'master' into invalid-texture-coordinates-cleaning-fix 62e3ac9b4d Merge pull request #1525 from daeyun/daeyun-lib-dirs bf9d319489 Update helper.py e52e44ea07 Formatting cc4531459f Set mNumUVComponents to 0 when deleting texture coordinate sets 938c02a358 Merge pull request #1523 from assimp/issue_1490 8be196f77d closes assimp/assimp#1490 : fix invalid access to mesh array when the array is empty. a502560da1 Merge pull request #1520 from assimp/issue_1514 af4556d569 only scale the root node because this will rescale all children nodes as well. 64ee21024b Add missing file. ae020281e2 Add unittest 711050de8a fix frame pointer arithmetic 4d09e61b13 Merge branch 'master' into master 99b9ba4c11 Merge branch 'master' into master aca8f068d0 Update ColladaExporter.cpp bbeb9dd640 Use correct lookup if scaling is enabled. d6f5ad66b2 closes assimp/assimp#1514: add misisng flag to enable global scaling. f49de6ecfe closes assimp/assimp#1514: add postprocess step for scaling c1c4a5ed2a Add two unit tests for OBJ importer 89d198399c Merge pull request #1516 from Matter-and-Form/gltf2-export-roughness-from-shininess-fix a6688243a7 [ObjExporter] add a test for the "no mtl" version of the obj exporter 18cef9b391 [ObjExporter] add a "no mtl" version of the obj exporter 8b73ec7541 Fix shininess to roughness conversion; Add comments 92046319be Merge pull request #1503 from Matter-and-Form/gltf2-materials bfa33b50ad Merge branch 'master' into gltf2-materials 6d98f82440 Merge pull request #1512 from aavenel/safe_atoi_OBJ cc8374dd80 Return exception when obj file contains invalid face indice aa733d6f77 Merge pull request #1486 from autodesk-forks/adsk-contrib-fix-std-stream-overflow 90ba199ad4 Update ColladaExporter.cpp cd4ef0a2e9 Update ColladaExporter.h 8cf61c3c89 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 6e88838602 powf -> pow 40147d253d Prefer “BLEND” over “MASK” as an alphaMode default 89358458f0 Approximate specularity / glossiness in metallicRoughness materials a898c1f2d1 SpecularFactor import and export improvements c71790c78d Diffuse color and diffuse texture import and export improvements dbae8e497d Merge pull request #1502 from Matter-and-Form/bugfix/gltf1-version 5eaf083fbd Fix output of glTF 1 version string 130c25eadb Merge pull request #1501 from assimp/kimkulling-traviscleanup 832c1fcc7f Update .travis.sh 299c34f063 Update .travis.sh 4d30ae5436 Merge pull request #1500 from assimp/kimkulling-doc_path c49d12cabb Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 4354cce313 Update Readme.md 2f56560e3f Merge pull request #1497 from ihmcrobotics/feature/jassimp-classloader-license 00e13ccd77 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow b0c435a66e Merge branch 'master' into feature/jassimp-classloader-license 0b2d5de94f Merge pull request #1496 from aavenel/unitTestObj 85b1181486 Merge branch 'master' into unitTestObj d997ea961a Merge pull request #1499 from ihmcrobotics/feature/collada-up_axis-api-improvements 42e2c30b4b Added helper getters for casting metadata payloads 1aa15c8069 Fix header and remove old debug code 100fa76a90 Merge remote-tracking branch 'upstream/master' into feature/collada-up_axis-api-improvements ff758e4c15 OBJ : add unit test to validate relative indices 9d2bcb56c7 Merge remote-tracking branch 'upstream/master' into feature/jassimp-classloader-license 82debbf54a Fixed copyright notice for IHMC jassimp improvements to BSD. Updated README b2eb599176 Update ColladaExporter.cpp 44ad80201c Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 82b269c424 Merge pull request #1480 from turol/ubsan f8c4002294 Fixed a divide by zero error in IFCBoolean that was latent, but nevertheless a bug 9a6b141568 FBX: Replace bad pointer casting with memcpy 7cbb5f4d3b B3DImporter: Replace bad pointer casting with memcpy 7b73fe8b02 Travis: Add Clang UBSan build configuration 6efe4e2841 CMake: Add support for Undefined Behavior sanitizer 8e7f476490 Merge pull request #1494 from assimp/invalid_normals_in_unittest 1767663071 Merge branch 'master' into invalid_normals_in_unittest 5a15226a95 Merge pull request #1489 from ihmcrobotics/feature/jassimp-classloader f56e28ea3c UnitTest: use correct initialized normals in unittest. 5e739acfa1 Merge branch 'master' into feature/jassimp-classloader 01510dfe1b Merge pull request #1491 from assimp/fix_blender_overflow e662f2dc6f Blender: fix short overflow. 5e00d4d5cb Populate metadata on Java objects. a7c1dde56e Added return statement to Write 0229a3acf3 Added supported for custom IO Systems in Java. Implemented ClassLoader IO System 33a54f021e Fix small bug in getStaticField 00eb2e401a Added field and getter for metadata entries to AiNode.java. 3ef1f37a80 Create AiMetadataEntry.java for jassimp port. e79848ff79 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 114c48bbcf Merge pull request #1479 from jaredmulconry/appveyor 3e7dbb5dfb Merge branch 'master' of github.com:assimp/assimp into appveyor c3074a81ca Merge pull request #1464 from assimp/issue_1453 a1b79e23e6 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 8f141c1966 Update utObjImportExport.cpp c128e7e56c Merge branch 'master' into issue_1453 fa91a0f64c Another minor source change, this time even more minor than the last. Let's see what the cache can do with this. 1497cc27b2 Cleaned up the whitespace again. Let's see how the cache does. dce2be9e09 I think I've worked out where the obj's are located. We shall see if the cache picks them up. 94e3f903e2 Merge branch 'master' into appveyor bb173749c1 Attempting to fix the directories being cached. eb46a40849 Merge branch 'master' into appveyor b8ad03baa1 Because I have to change a file somewhere to properly test the cache on AppVeyor, I've made some whitespace a bit better. 63338c0605 Merge branch 'master' of github.com:assimp/assimp into appveyor ffaa42af79 Merge pull request #1482 from TransformAndLighting/master 7c8e8e04fa Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 7353d25c13 Prevent failing stringstream to crash the export process 469c1a068f Merge branch 'master' of github.com:jaredmulconry/assimp into appveyor d60fe38253 Merge branch 'master' into master 21add21ab1 Merge pull request #1484 from jaredmulconry/msvc2013_tempfile_fix b2716a9c3f Merge branch 'master' into msvc2013_tempfile_fix 55cfe298b0 Merge pull request #1483 from turol/warnings 4a915653f5 Fixed IOStream reporting a file size of 0 for files that have been written, but not yet been flushed to disk. f90d874978 Open3DGC: Remove redundant const qualifiers from return types cd64eae590 GenericProperty: Remove useless const qualifier from return value 7e033c6cef FBX: Remove useless const qualifier from return value 3b4ffbc1b6 Test failures are now getting properly reported. Turning off 'fast finish' to allow all tests to execute. d8e3952b64 Merging the test_script with test reporting was a terrible idea in retrospect. on_finish should serve the purpose. e60e396721 Attempting to address failures with chained batch and powershell commands. 61836080c5 Quote escaping across nested batch and powershell hurts my brain. 27b6cc22db No fun/multiline allowed. 022a34e54c Fixing multiline batch command weirdness. 54d2f25aa5 Attempting to get test results reporting even if an error occurrs. 5e5b7f4f75 Refined the appveyor config so that test output is reported even if tests fail. 5149149b07 The environment section doesn't do what I thought it would. Duplication is bad, but seems neccessary. 58ac747634 Fixed some bad usage of environment variables. 90c9884c5e The environment section uses different syntax for a list of vars. 81d3010f73 Added the mtime_cache script to hopefully improve use of incremental building with appveyor. Reduced the verbosity of the appveyor config. Added use of mtime_cache. Fixed the output of an xml version of the test output for hooking into appveyor. 52da099738 Updated test output to log to xml and to upload those results appropriately, so they show up in AppVeyor correctly as tests at the end. 6a2dfb1efc Fixed up the path to the build artifacts to be cached. 3e80aabde5 Attempting to get tests to run. 26851880e4 Attempting to address issues with cloning the repo. shallow_copy seems to fail at times. I'll let it continue to clone the whole history. b57011552b Merge branch 'master' into issue_1453 f925e2cf4e Reproduce issue and remove assertion when a nullptr makes more sence fe79322959 Attempting to get the tests detected and run. d3de8dbf5f Paths aren't what I expected for the test directory. Trying something else, with a testing call to dir to help track it down. ba43e3a152 x86 isn't a valid VS platform. Win32 it is, then. 4c06abf281 Replaced the worker image name, which doesn't work as generator name, with a manually created generator name. 75eb2ad071 Merge branch 'master' into appveyor 63764ae42a Apparently @ escaping batch commands doesn't work in this context. 8f54892439 Cleaned up appveyor setup, added VS 2017 to the build matrix and attempted to add running of tests. 8e8ed97750 Merge pull request #1478 from turol/travis 10b49dfd25 Travis: Remove old attempt at disabling default configurations 684cb88e83 Travis: Remove redundant config bd65811329 Travis: Rename TRAVIS_NO_EXPORT to DISABLE_EXPORTERS so its meaning is more obvious 69b8c1f60d Travis: TRAVIS_NO_EXPORT is now implicitly off, disable explicit off f2cf8bf075 Travis: Disable GCC AddressSanitizer build, Clang AddressSanitizer is strictly better ea58801a2d Travis: ENABLE_COVERALLS is now implicitly off, disable explicit off 7037fdfe2c Travis: ASAN is now implicitly off, disable explicit off 42142105fa CMake: Be more verbose about enabled options 54d14e6e3b Travis: Refactor how we build CMake options 5301768256 Travis: Remove unused LINUX env variable 9a79d243f9 added additional displacement texture token. cc562b2b1c Merge pull request #1477 from turol/clang 326158633b Fixed warnings on MSVC caused by implicit conversions from double to float. 50b43f76e1 OpenGEXImporter: Copy materials to scene b841ed194b OpenGEXImporter: Store RefInfo in unique_ptr so they get automatically cleaned up 775f984d99 OpenGEXImporter: Fix IOStream leak 22b55d01a2 OpenGEXImporter: Store ChildInfo in unique_ptr so they get automatically cleaned up 61278aa408 AMFImporter: Fix memory leak 1f16ed9fd0 UnrealLoader: Fix IOStream leak 1bee5b0025 utRemoveVCProcess: Fix memory leak 9eef4c16a8 utMetadata: Fix memory leak 9f5b58e706 Upgrade RapidJSON to get rid of a clang warning ae8a4c0c62 Fix warning about non-constant array size d28e88feb7 CMake: Remove OpenMP stuff, it's unused and breaks Travis clang build 5cc316b874 Travis: Treat warnings as errors, without typos this time a3053eb358 Travis: Build with clang too 8ef219b985 Merge pull request #1476 from assimp/revert-1471-clang c1f93a69ae Revert "WIP: Enable Travis clang build" 4a9ab98240 Merge pull request #1474 from jaredmulconry/issue_1470 c9b9dab1ff Merge pull request #1475 from jaredmulconry/master b360838ef6 Merge pull request #1471 from turol/clang 3803a5181c Fixed warnings on MSVC caused by implicit conversions from double to float. 341222697a Address warnings on Clang 3.9 caused by having a static data member in a class template. 3f0bb9c634 OpenGEXImporter: Copy materials to scene 568003a0d3 OpenGEXImporter: Store RefInfo in unique_ptr so they get automatically cleaned up e7ff7b167f OpenGEXImporter: Fix IOStream leak b6d2b91799 OpenGEXImporter: Store ChildInfo in unique_ptr so they get automatically cleaned up 316046f748 AMFImporter: Fix memory leak 34acf47acd UnrealLoader: Fix IOStream leak 674fb5a46c utRemoveVCProcess: Fix memory leak 9bcfce63dc utMetadata: Fix memory leak 65547d5760 Upgrade RapidJSON to get rid of a clang warning afce984228 FBXImporter: Add explicit instantiation of log_prefix so other FBX source files can see it bf1aaf98f9 IFCImporter: Add explicit instantiation of log_prefix so IFCMaterial.cpp can see it e7c112916b Removed unnecessary files from zlib contribution a824b79508 Merge branch 'master' of github.com:assimp/assimp into issue_1470 1ef3b0f3f3 Fix warning about non-constant array size 452885672e CMake: Remove OpenMP stuff, it's unused and breaks Travis clang build 9eeece1b35 Travis: Treat warnings as errors, without typos this time f6706f3532 Travis: Build with clang too cbca8f574e Merge pull request #1432 from turol/asan 2a7f975613 Merge pull request #1469 from turol/warnings bab6ca2085 Upgraded zlib to 1.2.11.1 from the develop branch. 3964f5cf43 Update .gitignore c3e9d6132c Merge pull request #1468 from assimp/issue_1467 b5db7d3649 Disable warning 4351 on MSVC 2013 003c728daf appveyor: Treat warnings as errors 799f0a3ac8 Fix warnings-as-errors flag on MSVC 5804667dbb Addressed some mismatched news/deletes caused by the new glTF2 sources. 1eb7eceddf Addressed a number of memory leaks identified in unit tests by asan 29e46e4bb8 Addressed asan failures caused by misuse of APIs within unit tests. 1095ec454b Fix delete / delete[] mismatches in glTF2 importer efd861253d Fix delete / delete[] mismatches in MakeVerboseFormat da96b32fb9 Fix out-of-bounds read in MaterialSystem unit test 5ecab20bd0 Fix delete / delete[] mismatch in glTFAsset fff800f9ab Enable AddressSanitizer for Linux clang build 4652b66bb5 Add AddressSanitizer option to CMake 6ec25be0a6 OpenGEX: improve logging to be able to detect error-prone situations. 3f4663e369 closes assimp/assimp#1467. c202d43d8f Merge pull request #1466 from jaredmulconry/issue_1330 94860ff66e Merge pull request #1465 from turol/warnings f7b2380f86 travis: Treat warnings as errors 77ce6e562d Fix CMAKE option name 45d93701f8 Open3DGC: Fix some uninitialized variable warnings 9088deeb1d Eliminated all warnings under clang with default settings. One remains in the included zlib contrib project. a9e8836271 Added -fPIC flag to C compilers for GCC and clang. Removed -pedantic flag from some compilers. c4e91eb33f add some asserts. 2056e56bdb Obj: prepare test to reproduce crash on linux. 1c76962c98 closes assimp/assimp#1450: use correct name of exporter to gltf2 9033071237 Obj: rename attribute from exporter. 5adc029225 Merge branch 'master' of https://github.com/assimp/assimp c42589460d closes assimp/assimp#1459: fix out-of-boundary access error 6ae35fb4d1 Merge pull request #1462 from jaredmulconry/issue_1330 d28f45bfa8 Merge branch 'master' of github.com:assimp/assimp into issue_1330 87546ec54c Merge pull request #1461 from jfaust/master 4feac1b1f9 Changed a couple more function interfaces to correct the input type. 12b6895f7b Replaced unsigned long for the crc table to z_crc_t, to match what is returned by get-crc_table febd611d48 Fix glTF2::Asset::FindUniqueID() when the input string is >= 256 chars e77e89c8b7 Improved the naming of temporary file generator function. Replaced use of tmpnam in utIOStreamBuffer with this facility to addresssafety warning. 980d2b0eee Added a header to hold the file generation code for unit testing purposes. d0ca143a3b Merge branch 'master' of github.com:assimp/assimp into issue_1330 e2ab3e0d29 Changed the method by which temporary files are created for unit the FileSizeTest. Will apply to other tests next. b1410f8455 Merge pull request #1457 from jaredmulconry/issue_1330 4360267cb2 Replaced flakey macros with specific functions to serve the purpose f6fc5a7a11 Changed the FileSizeTest to not rely on tmpnam to eliminate warning on gcc. 7e91ac3443 Suppressed warning on gcc caused by the 'visibility' attribute being ignored on types. 79a5165106 Fixed unused variable warning by replacing them with descriptive comments 8dabd76e03 Fixed a warning caused by aiVector3D appearing in a packed struct, causing it to fail to pack as requested. 539410d033 Fixed an error when compiling samples under MSVC that was caused by assuming including windows.h would pull in shellapi.h 059a32654e Addressed warnings generated on MSVC across x86 and x64. b5ac248703 Merge pull request #1444 from turol/warnings 81b94a1dca Merge pull request #1445 from Matter-and-Form/gltf2-alphaMode-fix 5c44776532 Merge pull request #1447 from Matter-and-Form/gltf1-color-import-fix adec1b2175 Merge pull request #1446 from Matter-and-Form/feature/gltf2-primitives d27e667f1e Merge branch 'master' of https://github.com/assimp/assimp af9596674d FBX: add missing inversion of postrotation matrix for fbx. 3e8955faf5 Don’t ignore rgba(1,1,1,1) color properties 798542d7bd Formatting de0bf2ea96 Fix alphaMode storage and reading 8743d28ec5 SImplify mesh merging code 2efd2cdef8 tweaks to primitive merging logic; comments + formatting 814e8b3f8e Formatting 28523232cf Merge multiple meshes in a node into one mesh with many primtives; write out only one mesh per node 5147acfe65 Revert "store node mesh vs. meshes" d473a49456 Merge pull request #1442 from jcowles/master 982430c3ce BlenderDNA: Silence warning about inline function which is declared but not defined 40c308af44 glTF: Silence uninitialized variable warning b74fc9495a PlyLoader: Fix operator precedence issue in header check 4652be8f18 FIReader: Silence uninitialized variable warning 41724ace2d Collada: Silence uninitialized variable warning c207e74534 Fix glTF 2.0 multi-primitive support 702bc6358e Merge pull request #1441 from turol/travis 69f8dc9b31 Travis: Disable OS X build since it doesn't do anything currently 62db02210a Merge pull request #1440 from turol/travis d34895bf2c Merge pull request #1435 from jaredmulconry/issue_1065 484f73b179 Merge pull request #1437 from rmitton/sib-version cf8453a21a travis: Enable ccache 798d2d063c travis: Only build with xcode 8.3 167fb7e250 travis: Correctly minimize build matrix 5478d4d4c7 travis: Move os declarations earlier a77cbcf096 Merge pull request #1436 from turol/warnings f602055da5 Added Silo 2.5 support 234ffc0ad6 Fixed truncated material names 2ab72816fb Merge pull request #1 from assimp/master 01c50394ce FBXParser: Silence uninitialized variable warnings f1998d52dc Importer: Whitespace cleanup to fix GCC misleading indentation warning 046c229e48 AssbinExporter: Fix strict aliasing violation f4a0ab81b1 AssbinExporter: Add Write specialization for aiColor3D b9efc234d0 DefaultLogger: Whitespace cleanup to fix GCC misleading indentation warning 0b140db0a4 glTFExporter: Silence uninitialized variable warning f2e2f74d73 Add CMake flag to treat warnings as errors 94a6fc78f4 Addressed last remaining warning under MSVC caused by use of 'deprecated' fopen. dce39fdf43 Merge pull request #1433 from vkovalev123/patch-1 58213804ff Update 3DSLoader.cpp b9cfff8fac Merge pull request #1431 from assimp/revert-1427-asan afd6c4d57d Revert "Asan" d139b4d180 Merge pull request #1423 from Matter-and-Form/feature/gltf2 d49f86f1e7 Merge pull request #1427 from turol/asan 2cc0a378ed Update glTF in list of importers and exporters b6f122ff2c Fix delete / delete[] mismatch in glTFAsset 2938a259b8 Enable AddressSanitizer for Linux clang build 6a3b030094 MDP: fix encoding issues. b5f770e456 Merge branch 'master' of https://github.com/assimp/assimp e3163ec15e FBX: fix some minor findings. cbedc448c6 closes assimp/assimp#1426: add Defines.h to include folder for install. 190f034e38 Add AddressSanitizer option to CMake 933bbb4f1c Manually read alphaMode material property eca008d5ec Properly move string passed to JSON writer b0da0796c8 Fix Segfault caused by losing pointer to std::string 023cb27784 Revert "Remove simple gltf2 export unit test" 4b01ecaf10 Remove simple gltf2 export unit test 86a8a58d12 Exclude glTF2 Exporter test when ASSIMP_BUILD_NO_EXPORT cde29c937c Formatting b1a5ca4516 Use `forceNumber` argument of `WriteAttrs` to write correct attribute names, instead 990fe143a1 Fix mesh primitive’s attributes’ names 816e6909ca Remove KHR_binary_glTF code b4f5033d89 Remove compresssed file format flag ed2b699c4b Add gltf2 basic unit test d518289e72 more specific token search for Collada Loader 5cb13aa4b3 Load gltf .bin files from correct directory a438ece655 Remove premultipliedAlpha from gltf2 140b903d7a Fix parsing of glTF version Handle version as int in gltf Fix format specifiers in glTF version parser 19876e9822 Add support for importing both glTF and glTF2 files 2ee7991558 Restrict search for OFF header to first 3 bytes a5e8e0b2bd Remove commented out code 0a8183531e Set alphaMode, baseColorFactor opacity when model’s opacity isn’t 1 37582131f4 Set the metallicFactor to 0 if source file doesn’t have metallicFactor da6a252efb Fix METALLIC_FACTOR typo 3ba00ca421 Define gltf material property names as constants 54dd4804cd Fix indentation 44757af34a Implement pbrSpecularGlossiness property as Nullable 03cfa04ee4 Define default material values as static constants 1a5823700f Remove need for Has by returning an empty Ref in Get 21259e0835 Use different form of index accessor 37527849b7 Export material names properly a9c4fa84b5 Sampler improvements; Add new LazyDict method 7245cceead Set default values on Sampler 2abdbdb55e Fix unused CopyValue 63ef19d9ad Export extensions d277995a97 Formatting 7f01e3f48f Only export byteStride if not 0 a0d97505e5 store node mesh vs. meshes ab08a7c3cb reenable animation and skins exports f09892ab63 Write specularGlossiness textures on the specularGlossiness object feee7528d6 Make sure `on` flag for specularGlossiness is being persisted 8bef546b41 mention pbrSpecularGlossiness support 2d54019b8f Remove OPEN3DGC and compression references 562920fbb8 Changes to GLTF2 materials 7532d6aac1 Remove Light, Technique references 863458cd4a Start removing materials common, and adding pbrSpecularGlossiness 7615a97cd3 Remove redundant function 0cf69479c3 Use `!ObjectEmpty()` vs. `MemberCount() > 0` 11cb9ac139 Working read, import, export, and write of gltf2 (pbr) material 6b4286abf6 check in gltf2 models to test directory Remove un-needed test models b42d785afe Start managing and importing gltf2 pbr materials 67eb3b0608 temporarily disable gltf exporting of animations and skins 39172feb3e Start reading pbr materials 4d59dee5ea Cache retrieved items via an original index map 47c7c3cf50 Disambiguate Get methods f814acf33a Update glTF2 Asset to use indexes 63d3655f1b Duplicate gltfImporter as gltf2Importer; Include glTF2 importer in CMake List f7d39cfa71 Merge pull request #1425 from jaredmulconry/issue_1065 3c1cda0b8c Merge branch 'master' of github.com:assimp/assimp into issue_1065 698cd5826d Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. dfd109e640 Merge pull request #1424 from samitc/feature/fix-mesh-name-lost-with-PreTransformVertices-flag e40cd6c13c Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 1167edaeca Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 6db0a63d6e Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 6e02bcd8d6 Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. b7f1277175 Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 98532b45bf Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 97b67d5cb5 Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 39e5b919ca Merge pull request #1422 from elect86/patch-9 2ec46cc188 fix name lost in mesh and nodes when load with aiProcess_PreTransformVertices flag c2baa0f59d Added a link to pure jvm assimp port dbde54b4f7 Merge pull request #1421 from assimp/issue_1404 e4c1557561 Traivis: make build amtrix smaller. c143d2e02c closes assimp/assimp#1404: set name with merged meshes for output mesh. ee56ffa1f1 Merge pull request #1418 from umlaeute/debian-fixes-4.0.1 eb0ace4e18 exclude repository-settings from source-package generated via 'git archive' 042597552a split setup.py into multiple lines 3de9bbb73d fixed spelling error f8146e4da2 fix the buil 2df704edef fix the buil 82f0dae835 FIx build 11f70e2140 Tests: add 3D-importer test. b4da9c4f56 Fix review findings: remove unused includes 00e3b03c5b closes assimp/assimp#1406: fix merge issue + improve 3MF-tests 4f2fcf306e Merge pull request #1410 from THISISAGOODNAME/master 1e3a9ded11 Fix assimp_qt_viewer build failed on OSX fd9da14db7 Merge pull request #1408 from assimp/acgessler-patch-4 f8ef94095a Update version check in FBX reader to check for version >= 7500 instead of exactly 7500. 43a51df7ec Merge pull request #1405 from assimp/rickomax-master 7151cf117b Merge branch 'master' of https://github.com/rickomax/assimp into rickomax-master ce9c8a4efc Merge pull request #1403 from kebby/fbx_anim_fix c6360ba1ab Merge pull request #1401 from melMass/python3 12a28d33ce FBX importer: try a constant again (ll suffix this time) 9a12b6ef0b FBX importer: Back to INT64_MIN but include <stdint.h> also. cac93ad0a8 Merge pull request #1400 from kebby/master 80489963a1 FBX importer: don't rely ont INT64_MIN / ..MAX macros e90c615c27 Update Readme.md 7182f89a51 FBX importer: Use actual min/max of animation keyframes when start/stop time is missing 3a89e36718 Merge pull request #1399 from m4c0/master 3fef573a45 Merge pull request #1398 from Eljay/fix-irrxml 37f5619149 created a python3 version of the 3dviewer and fixed the / = float in py3 92beee9924 Collada importer: Add support for line strip primitives 2e5e56c000 Re-enabling PACK_STRUCT for MDL files. d0d45d1d22 Fix linking issue with irrXML 91f6a9a721 Readme: add TriLib to the official list of supported ports. a71a61f260 Merge pull request #1397 from Arshia001/master e0fc412e57 Fix OBJ discarding all material names if the material library is missing 6b4e3177e8 Merge pull request #1385 from gongminmin/FixForVS2017.3 b26fea4cf5 Fix compiling problems under VS2017.3. 1. WordIterator's operator== and operator!= must take const WordIterator& as parameter type. 2. OpenMP doesn't work with new two phase lookups. Need to disable twoPhase. dab0985994 assert: remove assert with more than one statement and use only ai_assert. 974eb669c8 Merge pull request #1383 from jeremyabel/patch-1 7861c359ba Added wiki link to C4D file format f78614d33e Merge pull request #1382 from jeremyabel/master b1313b04b8 should be map, not set 847e0291a0 changed a few leftover asserts to ai_assert 0629faf9b1 Merge pull request #1378 from dhritzkiv/feature/gltf-version 5b3b80cbc2 Formatting 83bfa61f8d version in glb header is stored as uint32_t 7a4a32625c Ensure gltf asset version is printed as d.0 7fd9c3dc98 § 1a2c69fda8 Merge branch 'master' of https://github.com/assimp/assimp c3cd7349d0 unzip: latest greatest. 8091e46e81 Merge pull request #1370 from 0xcccc/master 267d3f41e8 ply-loader: add brackets. ba658e7813 ply-importer: fix creation of vertex attributes. 8478df7dbd PlyLoader: fix vertex attribute lookup. def42bf624 Fix android build issues 81fd027860 closes assimp/assimp#1270: use HasTexture for texture coordinates. 232954c15e cmake cleanup. 919f2a1ea9 Commandline tool: fix url to project space. 36425677c7 Merge pull request #1365 from ihmcrobotics/feature/custom-library-loader 3c56117e4f Merge branch 'master' of https://github.com/assimp/assimp 5fe45a1aa3 Readme: update list of supported file formats. 44e2ba541f Merge pull request #1363 from jamesgk/gltf2 efa0aaf729 Merge pull request #1364 from pdaehne/master 1e99228861 Merge pull request #1366 from titorgalaxy/master 7557fdbb72 Fix install for builds with MSVC compiler and NMake. ab9dda594d Added return statement to Write be787f5c6c Added supported for custom IO Systems in Java. Implemented ClassLoader IO System 5939d81138 glTF2: Use better mipmap filter defaults 21391b1f74 Added javadoc for the JassimpLibraryLoader c91e9a94da glTF2: export materials' normal maps c4d0567a8a Provided access to the library loading code to allow custom library loaders b7b17b03ec glTF2: use opacity for diffuse alpha + alphaMode acf8c54e55 glTF2: Fix animation export 8243b01c06 Added missing include to stdlib.h and remove load library call 16ed8861eb X3D importer: Workaround for buggy Android NDK (issue #1361) bb55246c18 Export glTF 2 d7cbbaf23e Compile with glTF2 export option (currently same as glTF1 output) 38626d4260 glTF: start fork of files used in export, for glTF2 147541ab7f Complementing last fix 3d4b54f8fc Fixed FBX 7500 Binary reading REVERT: 2531d2226c Update CMakeLists.txt and config.h for assimp 4.0.1. REVERT: de5cf2635b For CI - suppress all the 3rd-party libraries' warnings. Somehow after bumping up the CMake minimum version, CMake configures Xcode to work "better" with xcpretty that now the warnings are piping through the xcpretty's filter. Unfortunately when performing CI build, this is undesirable because not only now the log size is swelling, the build is slower too. REVERT: 4fd12ed012 Updated Assimp to v3.2 REVERT: 834b24a33a Remove unused files/directories. git-subtree-dir: Source/ThirdParty/Assimp git-subtree-split: 9e74b56823cc43a1a0c184aede703a6db2e7b90d
sudilav
added a commit
to sudilav/ADSupport
that referenced
this issue
Jul 16, 2021
Similar to this issue: urho3d/urho3d#1444 Redefinition of timespec and timezone in H5win32defs.h because H5_HAVE_VISUAL_STUDIO is always defined regardless of any factors - throws errors below when running a MinGW build: In file included from ../H5private.h:607:0, from ../H5.c:22: ../H5win32defs.h:81:8: error: redefinition of 'struct timezone' struct timezone { ^~~~~~~~ In file included from ../H5private.h:109:0, from ../H5.c:22: /usr/x86_64-w64-mingw32/sys-root/mingw/include/time.h:259:8: note: originally defined here struct timezone { ^~~~~~~~ In file included from ../H5private.h:607:0, from ../H5.c:22: ../H5win32defs.h:88:8: error: redefinition of 'struct timespec' struct timespec ^~~~~~~~ In file included from ../os/default/H5public.h:38:0, from ../H5private.h:27, from ../H5.c:22:
- Forum
- Beginners
- Redefinition/Previous definition of stru
Redefinition/Previous definition of struct
I’ve googled, searched, tried different things, and I’m stuck. Learning C++, and one of the exercises is to pass a struct to a function. I’ve done that, but I am now trying to pass it to a function contained in a header file. I get these errors and I don’t quite understand how to fix it.
adStruct.cpp:7:8: error: redefinition of ‘struct Advertizing’
In file included from C:UsersjamesDesktopNoteP_C++adStruct.cpp:2:0:
dailyIncome.h:5:8: error: previous definition of ‘struct Advertizing’
adStruct.cpp file
|
|
and the header file
dailyIncome.h
|
|
So you can see the section of code in comment blocks — that works. Using the headers does not, but it feel sooooo close.
Thanks.
Remove lines 5 — 22 in the adStruct.cpp file.
You need to understand what happens when you include a file. The entire contents of the include file are placed in the .cpp file as if the 2 had been concatenated. Hence the compiler errors.
A better way of doing things is to make the Advertizing struct a class, with the findDailyIncome function being a class function. In C++ struct & class are almost the same thing, the only difference is that structs have public access by default.
The header file has the declaration of the class:
|
|
The .cpp file has the code for each member function:
|
|
Now for main.cpp:
|
|
Hope this helps, and you can see how organised it is. Some important points are that there is no code in the header file, so it can be reused in lots of places without causing chaos.
|
|
You could use the default destructor that the compiler provides. For that, don’t declare a destructor in your class.
Thank you,
Understanding concatenated is almost more help. Haven’t got to classes yet, I’m at a real basic level. Took Java though so that makes allot of sense.
Topic archived. No new replies allowed.
2016-05-09 — By Robert Elder
Introduction
Updated December 20, 2016: Added a couple new examples.
Updated January 1, 2017: Added another example.
Updated January 24, 2017: Added another example showing how identifiers can change meaning inside a declarator list.
Updated March 16, 2017: Added cases showing necessity of parse-time relationship of typedef redefinition management and the tag namespace hierarchy.
I decided to write this article to force myself to understand all of the complexities related to struct and union declarations, incomplete references, scoping rules and how they interact with the ‘typedef’ qualifier. If you read about scoping issues with structs, you’ll realize that things can get pretty complicated, and to really understand things it is necessary to enumerate a list of compiler test cases. Reading through these test cases is a great alternative to spending a night out at the club, and I hope you have as much fun reading them as I had writing them. This article considers only ISO C89 and all testing was done with gcc and clang. gcc version: (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4, Ubuntu clang version: 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4).
What Happens In Each Case?
Test Case | Notes |
---|---|
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c |
|
error: storage size of ‘a’ isn’t known |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c |
|
main.c:7:8: error: redefinition of ‘struct foo’ struct foo{ ^ main.c:1:8: note: originally defined here struct foo{ |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c |
|
In function ‘main’: main.c:13:11: error: ‘struct foo’ has no member named ‘i’ (void)b.f->i; |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c |
|
main.c:14:18: error: ‘struct foo’ has no member named ‘i’ (void)b.f->i; This case demonstrates that the side-effects of ‘struct foo;’ and ‘struct foo ty;’ are different with respect to what ‘struct foo’ references later in this scope. |
|
10:16: error: redefinition of ‘struct foo’ struct foo{ |
|
main.c:2:15: error: ‘foo’ defined as wrong kind of tag |
|
main.c:11:13: error: dereferencing pointer to incomplete type (void)f1.b->i; ^ main.c:18:13: error: dereferencing pointer to incomplete type (void)f2.b->j; ^ |
|
main.c: In function ‘main’: main.c:11:14: error: storage size of ‘f1’ isn’t known struct foo f1; ^ main.c:11:14: warning: unused variable ‘f1’ [-Wunused-variable] main.c:19:14: error: storage size of ‘f2’ isn’t known struct foo f2; ^ main.c:19:14: warning: unused variable ‘f2’ [-Wunused-variable] |
|
main.c:4:14: error: storage size of ‘f1’ isn’t known struct foo f1; |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c |
|
main.c:8:6: error: storage size of ‘f’ isn’t known |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c
This case is interesting, because when compared with the previous one, it re-inforces the idea that ‘struct abc;’ is treated in a very special (and difficult to detect) way. |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c
This is an important test case, as it illustrates that typedefs are not fully resolved as if they were a string replacement, as soon as they are encountered. |
|
main.c:8:9: warning: useless type name in empty declaration [enabled by default]; still compiles
Important because it demonstrates that a typedefed type cannot be used to declare an incomplete structure in the same way that the specifier it resolves to can be. |
|
expected identifier or ‘(’ before ‘{’ token
Demonstrates that a typedefed type cannot be used to complete a structure type, even though it would resolve to be the same specifier for that type. |
|
main.c:2:16: warning: ‘struct boo’ declared inside parameter list [enabled by default] int foo(struct boo {int a;}); ^ main.c:2:16: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] This demonstrates that you can declare or implement a function that cannot be called since no type will be compatible with it due to the fact that the scope of the structure definition is only inside the function parameter list. |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c
Demonstrates that structures can be defined as a type specifier to virtually any declarator. |
|
Produces warning in gcc: main.c:6:22: warning: empty declaration with type qualifier does not redeclare tag [enabled by default] const struct foo; But an error with clang: main.c:7:20: error: variable has incomplete type ‘struct foo’ struct foo f; |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c |
|
main.c:3:2: error: expected specifier-qualifier-list before ‘typedef’ typedef struct boo {int i;}; |
|
main.c:8:6: error: storage size of ‘f’ isn’t known str f; |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c
An interesting case that demonstrates that you can have a structure that contains 2 members of type ‘struct foo’ where each implementation of ‘struct foo’ is different. |
|
Compiles with warning in gcc: main.c:7:27: warning: declaration does not declare anything [enabled by default] struct foo; ^ Error in clang: main.c:8:28: error: field has incomplete type ‘struct foo’ |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c Clang warns about padding in structure. This case demonstrates that the incomplete structure ‘foo’ is registered in the ‘main’ scope just after the ‘{‘ character of the struct definition, and before the interpretation of the member ‘f’ of the same struct. |
|
main.c:4:9: error: ‘foo’ defined as wrong kind of tag struct foo * f; Demonstrates that a reference to the tag ‘foo’ will attempt to refer to the incompatible union type from the outer scope instead of declaring an incomplete type in the inner scope which would be completed later. |
|
Compiles without warnings or errors: gcc -std=c89 -pedantic -Wall main.c && clang -std=c89 -pedantic -Weverything main.c Demonstrates that the incomplete type reference is not a problem for function pointers inside the struct. |
|
Compiles in gcc with warnings, issues error in clang: error: reference to ‘foo’ is ambiguous |
|
Compiles without errors in gcc and clang using: gcc -std=c89 -pedantic -Wall main.c && ./a.out && clang -std=c89 -pedantic -Weverything main.c && ./a.out Produces output: 1 4 4 1 4 4 Important because it demonstrates that the meaning (and size of) an identifier can change inside of a declarator list (and even inside of an init_declarator) |
|
Compiles in gcc and clang with warnings: main.c:8:15: warning: redefinition of typedef ‘type1’ [-Wpedantic] typedef type2 type1; Interesting because it demonstrates that non-trivial typedef re-definitions will compile just fine |
|
Does not compile with error: error: typedef redefinition with different types (‘type1’ (aka ‘struct foo’) vs ‘struct foo’) Very interesting because it demonstrates that non-trivial typedef re-definitions (which must be managed at parse time due to the ambiguity of typedef identifiers) need to have some awareness of the tree of tag namespaces that exist from struct, union or enum types. |
Conclusion
The point of all this was to try and deduce what rules should be used by the parser for struct and union specifiers. One observation is that
struct foo;
is very much a special case when compared with any of
struct foo f; struct foo {int i;}; typedef struct foo ty;
The key difference comes from the fact that immediately after parsing ‘struct foo’, the ‘struct foo’ can almost always be taken to refer to whatever the closest declaration of ‘struct foo’ is, except when the ‘struct foo’ is followed by a semicolon. This is somewhat problematic for the parser, because the grammar rules allow for the possibility of a declarator (or possibly more specifiers) between the struct or union specifier and the semicolon. Furthermore, if ‘struct foo’ is not followed by a declarator, but is also preceded by a type qualifier or storage class specifier, then the behaviour is sometimes treated differently than the special case observed with an unqualified ‘struct foo;’. This is seen in the test case above where gcc emits a warning, and clang emits an error.
In addition, using
struct foo;
is colloquially understood to ‘declare’ the tag ‘foo’ as a structure, and using
struct foo{ int i; }
is colloquially understood to ‘declare’ and ‘define’ the tag ‘foo’ as a structure.
However, the effect of ‘declaring’ is different in these two approaches: In the first, ‘struct foo;’ will only declare the tag ‘foo’ in the current scope, but the second method will ‘declare’ it in the current scope, and any enclosing scope. This is described in the C89 standard section 3.5.2.3 Tags: «struct-or-union identifier ; specifies a structure or union type and declares a tag, both visible only within the scope in which the declaration occurs. It specifies a new type distinct from any type with the same tag in an enclosing scope (if any).»
Another observation is that an incomplete type can only be completed in the same scope in which it is declared (but not any deeper scope). Once it has been completed, the completed structure can be used used in any deeper scope.
Thoughts On Parsing
After parsing ‘struct foo’, do a lookup in the current scope for a tag of the name ‘foo’. If nothing is found in the current scope, repeat this process outward to any enclosing scope looking for a complete or incomplete reference. If one is found, use that struct_or_union_id. The struct_or_union_id is an id that uniquely identifies the ‘struct <tagname>’ and the scope in which it resides. If no matching tag is found, declare an incomplete type of ‘struct foo’ in the current scope.
The only exception to the above paragraph would be the special case of ‘struct foo;’, where upon parsing the semicolon, any id from an outer scope would be discarded and an incomplete structure type would be declared in the current scope.
For struct definitions, when a ‘}’ character is parsed, complete the reference to that type using the definition just parsed.
Easy as pie.
Join My Mailing List
Privacy Policy |
Why Bother Subscribing?
|
09-08-2013
#1
C lover
Redefinition errors in when compiling…
Not sure what’s going on here but I have several linux header files included and when I compile my program I get the below errors… I’m not sure how I should go about fixing it? Am I NOT supposed to use some of these headers? Source is below as well.
Looking through the headers mentioned in these errors, it’s looking like stuff really is defined in multiple places… Like I said, not so sure what to do about it.
Errors:
Code:
codeblox@Lubuntu-pc:~/Programming/C/Network/MITM/src$ gcc -g -o mitm *.c In file included from mitm.h:12:0, from create_raw.c:1: /usr/include/netpacket/packet.h:22:8: error: redefinition of ‘struct sockaddr_ll’ In file included from /usr/include/linux/netdevice.h:30:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from create_raw.c:1: /usr/include/linux/if_packet.h:12:8: note: originally defined here In file included from mitm.h:12:0, from create_raw.c:1: /usr/include/netpacket/packet.h:51:8: error: redefinition of ‘struct packet_mreq’ In file included from /usr/include/linux/netdevice.h:30:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from create_raw.c:1: /usr/include/linux/if_packet.h:261:8: note: originally defined here In file included from mitm.h:14:0, from create_raw.c:1: /usr/include/net/if.h:44:5: error: expected identifier before numeric constant /usr/include/net/if.h:111:8: error: redefinition of ‘struct ifmap’ In file included from /usr/include/linux/netdevice.h:28:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from create_raw.c:1: /usr/include/linux/if.h:142:8: note: originally defined here In file included from mitm.h:14:0, from create_raw.c:1: /usr/include/net/if.h:126:8: error: redefinition of ‘struct ifreq’ In file included from /usr/include/linux/netdevice.h:28:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from create_raw.c:1: /usr/include/linux/if.h:176:8: note: originally defined here In file included from mitm.h:14:0, from create_raw.c:1: /usr/include/net/if.h:176:8: error: redefinition of ‘struct ifconf’ In file included from /usr/include/linux/netdevice.h:28:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from create_raw.c:1: /usr/include/linux/if.h:225:8: note: originally defined here In file included from mitm.h:12:0, from get_args.c:1: /usr/include/netpacket/packet.h:22:8: error: redefinition of ‘struct sockaddr_ll’ In file included from /usr/include/linux/netdevice.h:30:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from get_args.c:1: /usr/include/linux/if_packet.h:12:8: note: originally defined here In file included from mitm.h:12:0, from get_args.c:1: /usr/include/netpacket/packet.h:51:8: error: redefinition of ‘struct packet_mreq’ In file included from /usr/include/linux/netdevice.h:30:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from get_args.c:1: /usr/include/linux/if_packet.h:261:8: note: originally defined here In file included from mitm.h:14:0, from get_args.c:1: /usr/include/net/if.h:44:5: error: expected identifier before numeric constant /usr/include/net/if.h:111:8: error: redefinition of ‘struct ifmap’ In file included from /usr/include/linux/netdevice.h:28:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from get_args.c:1: /usr/include/linux/if.h:142:8: note: originally defined here In file included from mitm.h:14:0, from get_args.c:1: /usr/include/net/if.h:126:8: error: redefinition of ‘struct ifreq’ In file included from /usr/include/linux/netdevice.h:28:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from get_args.c:1: /usr/include/linux/if.h:176:8: note: originally defined here In file included from mitm.h:14:0, from get_args.c:1: /usr/include/net/if.h:176:8: error: redefinition of ‘struct ifconf’ In file included from /usr/include/linux/netdevice.h:28:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from get_args.c:1: /usr/include/linux/if.h:225:8: note: originally defined here In file included from mitm.h:12:0, from main.c:1: /usr/include/netpacket/packet.h:22:8: error: redefinition of ‘struct sockaddr_ll’ In file included from /usr/include/linux/netdevice.h:30:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from main.c:1: /usr/include/linux/if_packet.h:12:8: note: originally defined here In file included from mitm.h:12:0, from main.c:1: /usr/include/netpacket/packet.h:51:8: error: redefinition of ‘struct packet_mreq’ In file included from /usr/include/linux/netdevice.h:30:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from main.c:1: /usr/include/linux/if_packet.h:261:8: note: originally defined here In file included from mitm.h:14:0, from main.c:1: /usr/include/net/if.h:44:5: error: expected identifier before numeric constant /usr/include/net/if.h:111:8: error: redefinition of ‘struct ifmap’ In file included from /usr/include/linux/netdevice.h:28:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from main.c:1: /usr/include/linux/if.h:142:8: note: originally defined here In file included from mitm.h:14:0, from main.c:1: /usr/include/net/if.h:126:8: error: redefinition of ‘struct ifreq’ In file included from /usr/include/linux/netdevice.h:28:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from main.c:1: /usr/include/linux/if.h:176:8: note: originally defined here In file included from mitm.h:14:0, from main.c:1: /usr/include/net/if.h:176:8: error: redefinition of ‘struct ifconf’ In file included from /usr/include/linux/netdevice.h:28:0, from /usr/include/linux/if_arp.h:26, from mitm.h:10, from main.c:1: /usr/include/linux/if.h:225:8: note: originally defined here codeblox@Lubuntu-pc:~/Programming/C/Network/MITM/src$Code:
#ifndef _MITM_H #define _MITM_H #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/socket.h> #include <errno.h> #include <linux/if_arp.h> #include <netinet/in.h> #include <netpacket/packet.h> #include <net/ethernet.h> #include <net/if.h> #include <sys/ioctl.h> void get_args(int argc, char ** argv, char ** host_a_ipstr, char ** host_b_ipstr, char ** iface_name); int create_raw(char * iface_name); #endif #include "mitm.h" int create_raw(char * iface_name) { int raw; struct ifreq req; struct sockaddr_ll sll; memcpy(req.ifr_name, iface_name, IFNAMSIZ); if((raw = socket(AF_INET, SOCK_RAW, ETHERTYPE_ARP)) == -1) { fprintf(stderr, "socket: %sn", strerror(errno)); exit(-1); } if(ioctl(raw, SIOGIFINDEX, &req) == -1) { fprintf(stderr, "ioctl: %sn", strerror(errno)); exit(-1); } sll.sll_family = AF_PACKET; sll.sll_protocol = htons(ETHERTYPE_ARP); sll.sll_ifindex = req.ifr_ifindex; if(bind(raw, (struct sockaddr *)&sll, sizeof(sll)) == -1) { fprintf(stderr, "bind: %sn", strerror(errno)); exit(-1); } return raw; } #include "mitm.h" void get_args(int argc, char ** argv, char ** host_a_ipstr, char ** host_b_ipstr, char ** iface_name) { int opt; if(argc == 7) { while((opt = getopt(argc, argv, "abi")) > 0) { switch(opt) { case 'a': * host_a_ipstr = argv[optind]; break; case 'b': * host_b_ipstr = argv[optind]; break; case 'i': * iface_name = argv[optind]; break; default: break; } } } else { fprintf(stderr, "Usage: %s -a [ipaddr] -b [ipaddr] -i [iface]n", argv[0]); exit(-1); } } #include "mitm.h" int main(int argc, char ** argv) { char * host_a_ipstr, * host_b_ipstr, * iface_name; int raw_sock; get_args(argc, argv, &host_a_ipstr, &host_b_ipstr, &iface_name); raw_sock = create_raw(iface_name); return 0; }
Last edited by Syscal; 09-08-2013 at 08:21 PM.
09-09-2013
#2
and the hat of int overfl
You should start by removing #include <linux/if_arp.h>
09-09-2013
#4
Registered User
Originally Posted by Syscal
Do you see any issue with taking and defining them in my header file?
if they change with subsequent versions of linux, you’ll need to update them. that’s the only problem I can see.
What can this strange device be?
When I touch it, it gives forth a sound
It’s got wires that vibrate and give music
What can this thing be that I found?
09-09-2013
#5
and the hat of int overfl
Constants such as what?
Any constants you should need should be in the user API.
If they’re in the kernel side implementation, chances are they’re private and kernel specific.
I have «been tasked» with trying to build old software (VERY old software, in fact, not compiled since 2014) on our newer platform, specifically using g++ 9.4.0 in Ubuntu 20.04. While doing so, I have encountered a number of errors, all of them occurring inside some of include files from «/usr/include/c++/9». The offending files are type_traits.h, bits/allocator.h, bits/basic_string.h, and bits/alloc_traits.h.
The build output looks like this:
make -C /home/schudall/TDWR_Appl_LocalUB/csci04/csc25
make[1]: Entering directory '/home/schudall/TDWR_Appl_LocalUB/csci04/csc25'
/usr/bin/g++ -c -I/home/schudall/TDWR_Appl_LocalUB/csci04/csc20 -I/home/schudall/TDWR_Appl_LocalUB/csci04/csc25 -Dvolatile= -O2 -Di586 -Wall -Wno-unused -DWX_MULTITHREADED -D_REENTRANT WxBase.C -o LINUX/WxBase.o
In file included from /usr/include/c++/9/bits/move.h:55,
from /usr/include/c++/9/bits/nested_exception.h:40,
from /usr/include/c++/9/exception:144,
from /usr/include/c++/9/ios:39,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from WxBase.C:33:
/usr/include/c++/9/type_traits:506:12: error: redefinition of ‘struct std::is_function<_Res(_ArgTypes ...)>’
506 | struct is_function<_Res(_ArgTypes...) volatile _GLIBCXX_NOEXCEPT_QUAL>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/type_traits:458:12: note: previous definition of ‘struct std::is_function<_Res(_ArgTypes ...)>’
458 | struct is_function<_Res(_ArgTypes...) _GLIBCXX_NOEXCEPT_QUAL>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is just one example of a number of other, similar errors being called out.
Point of disclosure: While I have some years’ experience in programming C++, most of my experience has been in taking older code and transferring it to our systems. My C++ training dates to about 20-25 years ago (pre ANSI???). Also, I am newer to the Ubuntu environment.
With all that said, it looks like maybe I am not including something that these files need, or not passing in proper arguments to the compiler, or perhaps I have not installed all needed libraries to build on this device. OR the code is so deprecated, but I would not know where to begin cleaning things up with these errors. Reading the man pages has not helped
What I would like to ask is, if anyone with a deeper (and more up-to-date) base of experience than me can point me in the right direction, and give me some idea as to what I need to do to solve these issues? Thank you in advance!