Compilation problem

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
Samergendy
Posts: 3
Joined: Sat Jan 13, 2018 12:33 am
Location: TEXAS SAN ANTONIO

Compilation problem

Post by Samergendy » Thu Mar 22, 2018 5:37 am

Hello,
I am trying to compile opensees 2.5 with ActiveTcl8.5.18 and Microsoft visual studio com 2017 in windows 10.
I tried to build the Win 64 using Opensees.sln. I get at least 10 errors with warnings including:
Cannot open include ‘Python.h’ No such file or directory for (OpenSeesPy)
and
unresolved external symbol "void * __cdecl OPS_NewtonHallM(void)" … for (OpenSees)

Any help what I am doing wrong or what is missing?
Regards

ChrisS
Posts: 14
Joined: Sun Aug 09, 2015 1:16 pm

Re: Compilation problem

Post by ChrisS » Fri Mar 23, 2018 11:35 am

Starting with the latest solution provided in the repository saves you a lot of work.
For the check out version 6701 of the OpenSees.sln do the following:
Open "Solution Explorer".
At the "algorithm" filter, inside "analysis" project, add the following existing files:
\SRC\analysis\algorithm\equiSolnAlgo\NewtonHallM.cpp
\SRC\analysis\algorithm\equiSolnAlgo\NewtonHallM.h
At the "surfaceLoad" filter, inside "element" project, add the following existing files:
\SRC\element\surfaceLoad\TriSurfaceLoad.cpp
\SRC\element\surfaceLoad\TriSurfaceLoad.h
Open the properties of the "element" project. At "Configuration Properties" -> "C/C++" ->"General" -> "Additional Include Directories" insert a new entry:
..\..\..\src\element\tetrahedron
At the "element" project, create a new filter named "tetrahedron". Add to it the following existing files:
\SRC\element\tetrahedron\FourNodeTetrahedron.cpp
\SRC\element\tetrahedron\FourNodeTetrahedron.h

or wait until aschellenberg updates the file "OpenSees.sln".

Regards
Chris

ChrisS
Posts: 14
Joined: Sun Aug 09, 2015 1:16 pm

Re: Compilation problem

Post by ChrisS » Sat Mar 24, 2018 12:29 am

Hello again Samergendy
For the Python issue you reported, I guess that you have not installed python3 at the default location.
Open "Solution Explorer". Open the properties of the "OpenSeesPy" project. At "Configuration Properties" -> "C/C++" ->"General" -> "Additional Include Directories" locate the last entry ("c:\Program Files\Python36\include") and point it to the "include" subfolder of your python installation folder.

Kind regards
Chris

Samergendy
Posts: 3
Joined: Sat Jan 13, 2018 12:33 am
Location: TEXAS SAN ANTONIO

Re: Compilation problem

Post by Samergendy » Mon Mar 26, 2018 8:36 am

Also the 'additional library directories' in the 'Linker' needs to be updated for Python36 libs path .
It is working now.
Thank you so much
Best regards

Samergendy
Posts: 3
Joined: Sat Jan 13, 2018 12:33 am
Location: TEXAS SAN ANTONIO

Re: Compilation problem

Post by Samergendy » Mon Apr 02, 2018 7:49 am

I am sorry to ask about this once again.

Although I receive zero errors when compiling opensees
========== Rebuild All: 27 succeeded, 0 failed, 0 skipped ==========
and opensees.exe is being created I still receive a very long warning list including:

Warning LNK4075 ignoring '/INCREMENTAL' due to '/FORCE' specification project: OpenSees
Warning C4244 'argument': conversion from 'Py_ssize_t' to 'int', possible loss of data project: OpenSeesPy
Warning LNK4006 ops_getndm_ already defined in OpenSeesCommands.obj; second definition ignored project: OpenSeesPy
Warning C4101 'b_dim1': unreferenced local variable project: cblas
Warning C4311 'type cast': pointer truncation from 'triangle *' to 'unsigned long' project: element
Warning C4101 'Info': unreferenced local variable project: graph


This warning list is removed when I build the solution again.
But, when I try to use the compiled file to run problems the solution cannot start with the compiled version although it run properly with the .exe version available in the website.

So how can I fix this issue ?

Kind regards,
Samer

Post Reply