nairnj / nairn-mpm-fea

nairn-mpm-fea computational mechanics project
86 stars 37 forks source link

file not recognized #11

Closed ethereal14 closed 2 years ago

ethereal14 commented 2 years ago

There was an error when I compiled NairnMPM: svninfo.o: file not recognized

Here are my compile environment and system version:

gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Linux version 4.15.0-20-generic (buildd@lgw01-amd64-039) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04 LTS
Release:    18.04
Codename:   bionic

I modified header file path and g++ path in Makefile:


ifeq ($(SYSTEM),gcc7)
    xercesSo = /usr/local/lib/libxerces-c.so
endif

ifeq ($(SYSTEM),gcc7)
    headersPath = /usr/local/include/xercesc
endif

ifeq ($(SYSTEM),gcc7)
    CC= /usr/bin/g++
endif
nairnj commented 2 years ago

svninfo.cpp is trivial source code that just defines a character string. I use it in development code to keep track of version number in use. In GitHub version, it just defines that last time code was updated on GitHub.

  1. Make sure you have svninfo.cpp in Common/System (get it if needed). Its entire contents are

include "stdafx.h"

const char *svninfo = "URL: https://github.com/nairnj/nairn-mpm-fea, Date: 2020-12-30";

  1. Make sure you did not corrupt the makefile in NairnMPM/build (Get fresh copy if needed)
  2. Try make clean and then recompile (in case old version of code was there)

I just did make command myself and no issues caused by svninfo.*

I have not used gcc 7, but should not be a problem.

ethereal14 commented 2 years ago

svninfo.cpp is trivial source code that just defines a character string. I use it in development code to keep track of version number in use. In GitHub version, it just defines that last time code was updated on GitHub.

  1. Make sure you have svninfo.cpp in Common/System (get it if needed). Its entire contents are

include "stdafx.h" const char *svninfo = "URL: https://github.com/nairnj/nairn-mpm-fea, Date: 2020-12-30";

  1. Make sure you did not corrupt the makefile in NairnMPM/build (Get fresh copy if needed)
  2. Try make clean and then recompile (in case old version of code was there)

I just did make command myself and no issues caused by svninfo.*

I have not used gcc 7, but should not be a problem.

Thank you for your reply. I'm going to make clean then make,and it success #:+1: