spreadsheet module eivindkvedalen C++

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
jmaustpc
Posts: 10562
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

spreadsheet module eivindkvedalen C++

Postby jmaustpc » Thu Apr 17, 2014 1:49 pm

Hi,

For what it's worth, my spreadsheet module implements expressions (including units!) with dependency tracking of properties already. The only thing left is to make it adhere to the undo framework in FreeCAD. Please see https://github.com/eivindkv/free-cad-co ... adsheetMod for the details. Now if I could just get my house remodelling work done, so I could get more spare time to spend on FreeCAD...

Eivind

Hi Eivind
I pulled your branch here
https://github.com/eivindkv/free-cad-co ... adsheetMod

but I could not get it to build on Kubuntu 12.04.4 with either OCC 6.5.0 or OCE master 0.16.
build_errors_spreadsheetmod_freecad.zip
(4.93 KiB) Downloaded 81 times
The above zip file contains a txt file which I copied and pasted the command line error messages for the first attempt with OCE master 0.16 and then I tried with the default Ubuntu 12.04 OCC 6.5.0 it also failed but I have included all the command line out put the second time.

I hope this helps.

Jim
User avatar
jriegel
Site Admin
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: spreadsheet module eivindkvedalen C++

Postby jriegel » Thu Apr 17, 2014 3:14 pm

I have a branch with eivens code on sf.net...
Stop whining - start coding!
jmaustpc
Posts: 10562
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: spreadsheet module eivindkvedalen C++

Postby jmaustpc » Thu Apr 17, 2014 3:21 pm

jriegel wrote:I have a branch with eivens code on sf.net...
which one? do you mean this one "master-spreadsheet"

http://sourceforge.net/p/free-cad/code/ ... heet/tree/


here is the list of branches on sourceforge
http://sourceforge.net/p/free-cad/code/ ... /branches/


Also have you updated his code or any other in that branch in anyway, or is it just a copy of his repo?

Jim
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: spreadsheet module eivindkvedalen C++

Postby eivindkvedalen » Thu Apr 17, 2014 3:31 pm

jmaustpc wrote:
jriegel wrote:I have a branch with eivens code on sf.net...
which one? do you mean this one "master-spreadsheet"

http://sourceforge.net/p/free-cad/code/ ... heet/tree/


here is the list of branches on sourceforge
http://sourceforge.net/p/free-cad/code/ ... /branches/


Also have you updated his code or any other in that branch in anyway, or is it just a copy of his repo?

Jim
Hi,

That branch is updated, primarily to make it work on Windows. I've looked at the log you sent me, and I think the branch above has a fix for your problem (iirc, there were some changes related to moc files in that branch).

Eivind
jmaustpc
Posts: 10562
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: spreadsheet module eivindkvedalen C++

Postby jmaustpc » Thu Apr 17, 2014 4:07 pm

jmaustpc wrote:
jriegel wrote:I have a branch with eivens code on sf.net...
which one? do you mean this one "master-spreadsheet"

http://sourceforge.net/p/free-cad/code/ ... heet/tree/
This branch does not compile, I just realised I had previously tried to build that branch and it also didn't work back then either.

It now gets to 98% and then dies

Code: Select all

Scanning dependencies of target Spreadsheet
[ 98%] Building CXX object src/Mod/Spreadsheet/App/CMakeFiles/Spreadsheet.dir/Expression.cpp.o
In file included from /home/user/Downloads/cad/mystuff/bitbucket-freecad-clone-sf-master/clone2/code/src/Mod/Spreadsheet/App/Expression.cpp:977:0:
lex.ExpressionParser.c: In function ‘void Spreadsheet::ExpressionParser::ExpressionParser_init_buffer(Spreadsheet::ExpressionParser::YY_BUFFER_STATE, FILE*)’:
lex.ExpressionParser.c:1701:61: error: ‘_fileno’ was not declared in this scope
lex.ExpressionParser.c:1701:63: error: ‘_isatty’ was not declared in this scope
make[2]: *** [src/Mod/Spreadsheet/App/CMakeFiles/Spreadsheet.dir/Expression.cpp.o] Error 1
make[1]: *** [src/Mod/Spreadsheet/App/CMakeFiles/Spreadsheet.dir/all] Error 2
make: *** [all] Error 2
This is on Kubuntu 12.04 64 bit.

Jim
jmaustpc
Posts: 10562
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: spreadsheet module eivindkvedalen C++

Postby jmaustpc » Thu Apr 17, 2014 4:11 pm

eivindkvedalen wrote:Hi,

That branch is updated, primarily to make it work on Windows. I've looked at the log you sent me, and I think the branch above has a fix for your problem (iirc, there were some changes related to moc files in that branch).

Eivind
I am trying yours now after your latest updates.....back in a bit....
jmaustpc
Posts: 10562
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: spreadsheet module eivindkvedalen C++

Postby jmaustpc » Thu Apr 17, 2014 5:10 pm

still will not compile

The zip is a new txt file of the copy paste from the terminal.
build_errors_spreadsheetmod_freecad2.zip
(9.78 KiB) Downloaded 74 times
jmaustpc
Posts: 10562
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: spreadsheet module eivindkvedalen C++

Postby jmaustpc » Fri Apr 18, 2014 9:00 am

Hi Eivend
regarding your code from your git hub spreadsheet branch

when I try to compile it I get the error I posted about

its complaining about line 24 in AppSpreadsheetGui.cpp....which is an "include line, its this

Code: Select all

#include "qrc_Spreadsheet.cpp"
should that include be a cpp file not an ".h" file? Either way If I search file name on "qrc_Spreadsheet" without extension, I find nothing. There is a Spreadsheet.qrc file for the icons etc. The equivalent App"wb"Gui.cpp file for the other workbenches does not include the "qrc" file.

I have tried commenting out that line

Also in src/mod/spreadsheet/gui the qtcolorpicker.cpp file line 1155 and 1156

Code: Select all

#include "moc_qtcolorpicker.cpp"
#include "moc_qtcolorpicker.cpp.cpp"
is that "cpp.cpp" a typo?

I have tried commenting out 1156


with those two modifications ...it compiled...FreeCAD started and seems to function OK but when I select the spreadsheet WB from the drop down list I get an error window pop up saying "no module named SpreadsheetGui" ....so I am guessing somewhere SpreadsheetGui is being called rather than Spreadsheet?

Jim
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: spreadsheet module eivindkvedalen C++

Postby eivindkvedalen » Fri Apr 18, 2014 12:32 pm

jmaustpc wrote:Hi Eivend
...
its complaining about line 24 in AppSpreadsheetGui.cpp....which is an "include line, its this

Code: Select all

#include "qrc_Spreadsheet.cpp"
...

Also in src/mod/spreadsheet/gui the qtcolorpicker.cpp file line 1155 and 1156

Code: Select all

#include "moc_qtcolorpicker.cpp"
#include "moc_qtcolorpicker.cpp.cpp"
is that "cpp.cpp" a typo?
...

Jim
Hi

Those are not typos. The first one is a compiled resource file, if I recall correctly, coming out from rcc. The second one is a bit awkward, but it is the result from moc being invoked on the qtcolorpicker.cpp file. Normally moc is used on header files, but not in this case. My guess is that moc/rcc are writing the files with a different extension, like cxx. Could you please check your build directory and see if you can find qrc_Spreadsheet.cxx and moc_qtcolorpicker.cpp.cxx there? If so, try including those instead.

Eivind
jmaustpc
Posts: 10562
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: spreadsheet module eivindkvedalen C++

Postby jmaustpc » Fri Apr 18, 2014 12:49 pm

They are in the build directory /src/Mod/Spreadsheet/Gui/

moc_qtcolorpicker.cpp

and

qrc_Spreadsheet.cxx

Jim