trophia / sna1

A model of the SNA1 fishery
2 stars 2 forks source link

Compiling on windows #29

Closed Craig44 closed 6 years ago

Craig44 commented 6 years ago

I am trying to set up the build environment on my windows machine. I have built the boost libraries (filesystem and test) without errors and extracted stencila. The requires structure is the same that is on my Ubuntu machine (which builds the ibm fine). when I run the following call g++ -std=c++11 -Wall -Wno-unused-function -Wno-unused-local-typedefs -Wno-unused-variable -pthread -O3 -I. -Irequires/boost -Irequires/stencila -osna1.exe sna1.cpp -Lrequires/boost/lib -lboost_system -lboost_filesystem

I get the attached error, which is not that obvious to me, it seems to be related to the stencila library and boost I was hoping maybe @nokome you would now what silly error I have done for these errors to exist. Just if you were wondering I have added some extra print outs in the make file to make sure the variables were doing what I thought build.log

nokome commented 6 years ago

I've seen this before. I think it all relates to the use of uint (a shortcut macro or typedef which is not supported on all platforms). Could you try changing all uint to unsigned int in this repo. I think the other errors displayed in the log are propagated from there.

Craig44 commented 6 years ago

Yip that did it, The last thing that I have found on the windows build relating to this object.

It will build an executable if I keep that line and others associated with it, but when I run the executable it crashes straight away doesn't print any information.

If I comment that object out and all of its workings later in the source file it builds and starts to run the executable as expected. Any ideas on why that is. I will leave it for now, but it is very strange. If you think it would be useful I can commit my make file that should build the executable on windows 10 through the power shell