I've been trying for the past few days to compile the source code for FEBio without luck. I've tried using Visual Studio 2017 Community and Visual Studio Express 2013.
It seems that I have two problems. The first is with the file "svnrev.py". Since I don't have TortoiseSVN installed, I changed the "svnrev.py" file to the version below. Is this safe to do? It seems to compile fine.
The second issue seems to be that the compiler is trying to link with the FEBioFluid library, which didn't come in the source code download.
Here is my workflow in VS2017:
1- Open Visual Studio (2017)
2- File>Open>Project/Solution
3- Select FEBio2.sln in VS2013 folder
4- Retarget Projects to Windows SDK Version 10.0.14393.0, Platform Toolset: Upgrade to v141
5- Select Release, Win 32
6- Build (Ctrl+Shift+B)
In VS2013 everything is the same but step 4 is not necessary.
Here is the output (the error part) of building with VS17. With VS13 it is the same except it doesn't have the line that starts with "11>C:\Program..."
I would be very grateful for any help solving this.
Best regards,
Miguel
It seems that I have two problems. The first is with the file "svnrev.py". Since I don't have TortoiseSVN installed, I changed the "svnrev.py" file to the version below. Is this safe to do? It seems to compile fine.
Code:
#! /usr/bin/env python # -*- coding: utf-8 -*- import subprocess, sys, os # Use subwcrev on Windows to determine the svn revision and create svnrev.h # Find the revision proj_dir = os.getcwd() #print(proj_dir) os.chdir("../..") feb_dir = os.getcwd() #print(feb_dir) try: sub_out = subprocess.Popen(['subwcrev', feb_dir], stdout=subprocess.PIPE).communicate()[0] #print(sub_out) revision_line = sub_out.split("\n")[2] if 'Mixed' in revision_line: revision = revision_line.split(":")[1] elif 'Updated' in revision_line: revision = revision_line.split(" ")[3] else: sys.exit("Error: unknown subwcrev output") #print(revision) except: revision = str(0) print('Warning: "subwcrev" not detected, revision number set to 0') # Write svnrev.h f_svnrev = open(feb_dir + "/FEBioLib/svnrev.h", "w") f_svnrev.write("// This file is created by svnrev.py which uses subwcrev in Windows\n") f_svnrev.write("// to determine the svn revision number\n\n") f_svnrev.write("#define SVNREVISION " + revision + "\n") f_svnrev.close()
The second issue seems to be that the compiler is trying to link with the FEBioFluid library, which didn't come in the source code download.
Here is my workflow in VS2017:
1- Open Visual Studio (2017)
2- File>Open>Project/Solution
3- Select FEBio2.sln in VS2013 folder
4- Retarget Projects to Windows SDK Version 10.0.14393.0, Platform Toolset: Upgrade to v141
5- Select Release, Win 32
6- Build (Ctrl+Shift+B)
In VS2013 everything is the same but step 4 is not necessary.
Here is the output (the error part) of building with VS17. With VS13 it is the same except it doesn't have the line that starts with "11>C:\Program..."
Code:
11>------ Build started: Project: FEBio2, Configuration: Release Win32 ------ 11>CommandManager.cpp 11>console.cpp 11>FEBio.cpp 11>FEBioCommand.cpp 11>FEBioStdSolver.cpp 11>Interrupt.cpp 11>stdafx.cpp 11>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(647,5): error MSB6006: "link.exe" exited with code 1181. 11>LINK : fatal error LNK1181: cannot open input file 'febiofluid.lib' 11>Done building project "FEBio2.vcxproj" -- FAILED. ========== Build: 9 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
Best regards,
Miguel
Comment