i am trying to built this on windows
i have QT creator, and it runs and compiles with cmake for other stuff.
what IDE are you using.
I need to make some changes to support my sketchup files, which are very large
i got the skp2vrjanus.pro working and compiling under debug :)
Yeah....
Gets to command prompt asking for sketchup file to convert.
But i get a ton of errors in the console. Any ideas ?
14:17:24: Running steps for project skp2vrjanus...
14:17:24: Configuration unchanged, skipping qmake step.
14:17:24: Starting: "C:_data\software\Qt\Tools\mingw482_32\bin\mingw32-make.exe"
C:_data\software\Qt\5.3\mingw482_32\bin\qmake.exe -spec win32-g++ CONFIG+=debug -o Makefile ..\src\skp2vrjanus.pro
C:/_data/software/Qt/Tools/mingw482_32/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/_data/bitbucket/team-bv-pg/bv-code/cad/src/Converters/skp2vrjanus/build-skp2vrjanus-Desktop_Qt_5_3_MinGW_32bit-Debug'
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -I../src -I'../src/lib/SketchupSDKLib/headers' -I'.' -I'C:/_data/software/Qt/5.3/mingw482_32/mkspecs/win32-g++' -o debug/FileFunctionsWin.o ../src/FileFunctionsWin.cpp
In file included from ../src/FileFunctionsWin.cpp:9:0:
../src/stdafx.h: In function 'std::string stringReplace(std::string, std::string, std::string)':
../src/stdafx.h:54:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(pos == -1)
^
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -I../src -I'../src/lib/SketchupSDKLib/headers' -I'.' -I'C:/_data/software/Qt/5.3/mingw482_32/mkspecs/win32-g++' -o debug/HtmlWriter.o ../src/HtmlWriter.cpp
In file included from ../src/HtmlWriter.cpp:1:0:
../src/StdAfx.h: In function 'std::string stringReplace(std::string, std::string, std::string)':
../src/StdAfx.h:54:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(pos == -1)
^
../src/HtmlWriter.cpp: At global scope:
../src/HtmlWriter.cpp:31:6: warning: unused parameter 'instances' [-Wunused-parameter]
void HtmlWriter::writeAssets( const vector<InstanceInfo>& instances) {
^
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -I../src -I'../src/lib/SketchupSDKLib/headers' -I'.' -I'C:/_data/software/Qt/5.3/mingw482_32/mkspecs/win32-g++' -o debug/Material.o ../src/Material.cpp
In file included from ../src/Material.cpp:1:0:
../src/StdAfx.h: In function 'std::string stringReplace(std::string, std::string, std::string)':
../src/StdAfx.h:54:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(pos == -1)
^
../src/Material.cpp: In function 'void stringSplit(std::string, char, std::vectorstd::basic_string&)':
../src/Material.cpp:11:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(i==-1) {
^
../src/Material.cpp: In member function 'void Material::saveTextures(const string&)':
../src/Material.cpp:87:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i < f.length(); i ++){
^
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -I../src -I'../src/lib/SketchupSDKLib/headers' -I'.' -I'C:/_data/software/Qt/5.3/mingw482_32/mkspecs/win32-g++' -o debug/ModelWriter.o ../src/ModelWriter.cpp
In file included from ../src/ModelWriter.cpp:1:0:
../src/StdAfx.h: In function 'std::string stringReplace(std::string, std::string, std::string)':
../src/StdAfx.h:54:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(pos == -1)
^
../src/ModelWriter.cpp: In member function 'void ModelWriter::visitFaces(SUEntitiesRef, VisitorFunc, bool, Transform)':
../src/ModelWriter.cpp:39:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i < count; i++){
^
../src/ModelWriter.cpp:48:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i < count; i++){
^
../src/ModelWriter.cpp: At global scope:
../src/ModelWriter.cpp:31:6: warning: unused parameter 'recursive' [-Wunused-parameter]
void ModelWriter::visitFaces(SUEntitiesRef ents, VisitorFunc func, bool recursive, Transform transform)
^
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -I../src -I'../src/lib/SketchupSDKLib/headers' -I'.' -I'C:/_data/software/Qt/5.3/mingw482_32/mkspecs/win32-g++' -o debug/ShaderWriter.o ../src/ShaderWriter.cpp
In file included from ../src/ShaderWriter.cpp:1:0:
../src/stdafx.h: In function 'std::string stringReplace(std::string, std::string, std::string)':
../src/stdafx.h:54:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(pos == -1)
^
../src/ShaderWriter.cpp: In member function 'void ShaderWriter::includeFile(std::string, std::string)':
../src/ShaderWriter.cpp:51:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(i != -1){
^
../src/ShaderWriter.cpp:61:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(i != -1) {
^
../src/ShaderWriter.cpp:66:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(i != -1) {
^
../src/ShaderWriter.cpp: In member function 'void ShaderWriter::writeLights(const std::vector<InstanceInfo>&)':
../src/ShaderWriter.cpp:131:21: warning: missing initializer for member 'SUPoint3D::y' [-Wmissing-field-initializers]
SUPoint3D pos = {0};
^
../src/ShaderWriter.cpp:131:21: warning: missing initializer for member 'SUPoint3D::z' [-Wmissing-field-initializers]
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -I../src -I'../src/lib/SketchupSDKLib/headers' -I'.' -I'C:/_data/software/Qt/5.3/mingw482_32/mkspecs/win32-g++' -o debug/sketchup2room.o ../src/sketchup2room.cpp
In file included from ../src/sketchup2room.cpp:4:0:
../src/stdafx.h: In function 'std::string stringReplace(std::string, std::string, std::string)':
../src/stdafx.h:54:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(pos == -1)
^
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -I../src -I'../src/lib/SketchupSDKLib/headers' -I'.' -I'C:/_data/software/Qt/5.3/mingw482_32/mkspecs/win32-g++' -o debug/SketchupHelper.o ../src/SketchupHelper.cpp
In file included from ../src/SketchupHelper.cpp:2:0:
../src/stdafx.h: In function 'std::string stringReplace(std::string, std::string, std::string)':
../src/stdafx.h:54:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(pos == -1)
^
../src/SketchupHelper.cpp: At global scope:
../src/SketchupHelper.cpp:25:31: warning: missing initializer for member 'SUPoint3D::y' [-Wmissing-field-initializers]
const SUPoint3D NullPos = { 0 };
^
../src/SketchupHelper.cpp:25:31: warning: missing initializer for member 'SUPoint3D::z' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp: In member function 'bool SketchupHelper::parseInstanceName(const string&, InstanceInfo&)':
../src/SketchupHelper.cpp:169:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(firstPipe == -1){
^
../src/SketchupHelper.cpp:203:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(pos != -1) {
^
../src/SketchupHelper.cpp:205:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
string option = name.substr(pos+1, ((nextPos!=-1 && nextPos < lastPipe) ? nextPos : lastPipe) - (pos+1) );
^
../src/SketchupHelper.cpp:209:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(equals != -1) {
^
../src/SketchupHelper.cpp: In member function 'void SketchupHelper::extractInstances(SUEntitiesRef, const Transform&)':
../src/SketchupHelper.cpp:252:25: warning: missing initializer for member 'InstanceInfo::transform' [-Wmissing-field-initializers]
InstanceInfo info = {0};
^
../src/SketchupHelper.cpp:252:25: warning: missing initializer for member 'InstanceInfo::modelName' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp:252:25: warning: missing initializer for member 'InstanceInfo::modelId' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp:252:25: warning: missing initializer for member 'InstanceInfo::type' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp:252:25: warning: missing initializer for member 'InstanceInfo::attributes' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp:252:25: warning: missing initializer for member 'InstanceInfo::value' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp:252:25: warning: missing initializer for member 'InstanceInfo::offset' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp:252:25: warning: missing initializer for member 'InstanceInfo::texture' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp: In member function 'void SketchupHelper::extractImages(SUEntitiesRef, const Transform&)':
../src/SketchupHelper.cpp:308:35: warning: missing initializer for member 'InstanceInfo::transform' [-Wmissing-field-initializers]
InstanceInfo info = {0};
^
../src/SketchupHelper.cpp:308:35: warning: missing initializer for member 'InstanceInfo::modelName' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp:308:35: warning: missing initializer for member 'InstanceInfo::modelId' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp:308:35: warning: missing initializer for member 'InstanceInfo::type' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp:308:35: warning: missing initializer for member 'InstanceInfo::attributes' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp:308:35: warning: missing initializer for member 'InstanceInfo::value' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp:308:35: warning: missing initializer for member 'InstanceInfo::offset' [-Wmissing-field-initializers]
../src/SketchupHelper.cpp:308:35: warning: missing initializer for member 'InstanceInfo::texture' [-Wmissing-field-initializers]
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -I../src -I'../src/lib/SketchupSDKLib/headers' -I'.' -I'C:/_data/software/Qt/5.3/mingw482_32/mkspecs/win32-g++' -o debug/stdafx.o ../src/stdafx.cpp
In file included from ../src/stdafx.cpp:5:0:
../src/stdafx.h: In function 'std::string stringReplace(std::string, std::string, std::string)':
../src/stdafx.h:54:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(pos == -1)
^
g++ -Wl,-subsystem,console -mthreads -o debug/skp2vrjanus.exe debug/FileFunctionsWin.o debug/HtmlWriter.o debug/Material.o debug/ModelWriter.o debug/ShaderWriter.o debug/sketchup2room.o debug/SketchupHelper.o debug/stdafx.o -LC:/_data/bitbucket/team-bv-pg/bv-code/cad/src/Converters/skp2vrjanus/src/lib/SketchupSDKLib/binaries/x86/ -lslapi
mingw32-make[1]: Leaving directory 'C:/_data/bitbucket/team-bv-pg/bv-code/cad/src/Converters/skp2vrjanus/build-skp2vrjanus-Desktop_Qt_5_3_MinGW_32bit-Debug'
14:17:35: The process "C:_data\software\Qt\Tools\mingw482_32\bin\mingw32-make.exe" exited normally.
14:17:35: Elapsed time: 00:11.
I have gotten the release version to compile and work in QT.
No errors.
But when i try to just open the outout skp2vrjanus.exe from command line i get:
Cant find "libgcc_s_dw2.1.dll
It seems like a dependency that QT provides when its running with QT.
ANY ideas ?
Sorry about the late reply, I've been away for 2 weeks with no connectivity. I have been building the project with microsoft visual C++ express. Good to hear it builds with QT Creator.
From experience I think you will find that dll bundled with the QT SDK in the GCC bin directory.
I needed to make a few changes to the code.
If you compile with visual studio will it work on Linux or Mac ?
G
I confirm that it perfectly compile on visual studio using the latest master branch code. Indeed you need to get sketchup sdk and update your c++ and linker include directories to include this sdk lib in your vcproj in order to mâle the build succeeded.
Tell me if you still have problems acter m'y advise ans sens screenshots of your Project c++ général ans linker général property pages
There is no Linux version as the sketchup library provided by Trimble is only Windows and Mac. There is a xcode project for build on the mac