Comments (5)
It turns out the -arch flag is specific to the Apple-specific version of gcc. The equivalent flag to compile in linux is either -m32 or -m64, depending on your architecture. I got it to compile by editing the Makefile, changing the line "ARCH_FLAGS= -arch x86_64'" to "ARCH_FLAGS=-m64", for 64 bits architecture.
from facetracker.
Thanks for the note. I modified the Makefile, and compiled all the C++ files to .o files. But now when generating bin/FaceTracker, I have a lot linking errors to opencv functions.
My machine runs Ubuntu, and all the opencv library files can be found at /usr/local/lib. I don't know why g++ cannot find and link to them. My opencv sample programs can compile just fine.
Have you tried compiling FaceTracker on Ubuntu ?
Thanks,
from facetracker.
I built it in debian unstable, and I didn't get any other errors while
building besides that. Though I did have a build of OpenCV compiled without
video capture support, so it took me a couple of tries to figure it out and
recompile OpenCV correctly.
In your case, it might be worth a shot recompiling OpenCV including any
additional features that seem related to your missing libraries. I like to
use cmake-gui to make the building process less painful, you can find it in
the ubuntu repos with a search for cmake. Hard to tell more without looking
at your Makefile and the error output from make, though.
cheers,
On Fri, Mar 15, 2013 at 8:20 PM, pc2013 [email protected] wrote:
Thanks for the note. I modified the Makefile, and compiled all the C++
files to .o files. But now when generating bin/FaceTracker, I have a lot
linking errors to opencv functions.My machine runs Ubuntu, and all the opencv library files can be found at
/usr/local/lib. I don't know why g++ cannot find and link to them. My
opencv sample programs can compile just fine.Have you tried compiling FaceTracker on Ubuntu ?
Thanks,
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-14979878
.
from facetracker.
After getting the same problem, some research into this issue revealed that starting from Ubuntu 11.10, libraries must be placed behind objects needing them. For example, g++ pkg-config --cflags opencv
easyprog.cpp pkg-config --libs opencv
-o easyprog. I also attached the modified Makefile if you would find it useful:
Paths
OPENCV_PATH=/usr/local
Programs
CC=
CXX=g++
Flags
ARCH_FLAGS=-m64
CFLAGS=-Wextra -Wall -pedantic-errors $(ARCH_FLAGS) -O3
LDFLAGS=$(ARCH_FLAGS)
DEFINES=
INCLUDES=-I$(OPENCV_PATH)/include -Iinclude/
#LIBRARIES=-L$(OPENCV_PATH)/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_objdetect
LIBRARIES=pkg-config --libs opencv
Files which require compiling
SOURCE_FILES=
src/lib/IO.cc
src/lib/PDM.cc
src/lib/Patch.cc
src/lib/CLM.cc
src/lib/FDet.cc
src/lib/PAW.cc
src/lib/FCheck.cc
src/lib/Tracker.cc
Source files which contain a int main(..) function
SOURCE_FILES_WITH_MAIN=src/exe/face_tracker.cc
End Configuration
SOURCE_OBJECTS=$(patsubst %.cc,%.o,$(SOURCE_FILES))
ALL_OBJECTS=
$(SOURCE_OBJECTS)
DEPENDENCY_FILES=
all: bin/face_tracker
%.o: %.cc Makefile
@# Make dependecy file
@# Compile
-include $(DEPENDENCY_FILES)
bin/face_tracker: $(ALL_OBJECTS)
.PHONY: clean
clean:
@echo "Cleaning"
@for pattern in '~' '.o' '*.d' ; do
find . -name "$$pattern" | xargs rm ;
done
from facetracker.
Thanks, I can compile it now.
From: CptMonac [email protected]
To: kylemcdonald/FaceTracker [email protected]
Cc: pc2013 [email protected]
Sent: Tuesday, March 19, 2013 10:59 PM
Subject: Re: [FaceTracker] compiling issue (#3)
After getting the same problem, some research into this issue revealed that starting from Ubuntu 11.10, libraries must be placed behind objects needing them. For example, g++ pkg-config --cflags opencv easyprog.cpp pkg-config --libs opencv -o easyprog. I also attached the modified Makefile if you would find it useful:
Paths
OPENCV_PATH=/usr/local
Programs
CC=
CXX=g++
Flags
ARCH_FLAGS=-m64
CFLAGS=-Wextra -Wall -pedantic-errors $(ARCH_FLAGS) -O3
LDFLAGS=$(ARCH_FLAGS)
DEFINES=
INCLUDES=-I$(OPENCV_PATH)/include -Iinclude/
#LIBRARIES=-L$(OPENCV_PATH)/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_objdetect
LIBRARIES=pkg-config --libs opencv
Files which require compiling
SOURCE_FILES=
src/lib/IO.cc
src/lib/PDM.cc
src/lib/Patch.cc
src/lib/CLM.cc
src/lib/FDet.cc
src/lib/PAW.cc
src/lib/FCheck.cc
src/lib/Tracker.cc
Source files which contain a int main(..) function
SOURCE_FILES_WITH_MAIN=src/exe/face_tracker.cc
End Configuration
SOURCE_OBJECTS=$(patsubst %.cc,%.o,$(SOURCE_FILES))
ALL_OBJECTS=
$(SOURCE_OBJECTS)
DEPENDENCY_FILES=
all: bin/face_tracker
%.o: %.cc Makefile
@# Make dependecy file
@# Compile
-include $(DEPENDENCY_FILES)
bin/face_tracker: $(ALL_OBJECTS)
.PHONY: clean
clean:
@echo "Cleaning"
@for pattern in '~' '.o' '*.d' ; do
find . -name "$$pattern" | xargs rm ;
done
—
Reply to this email directly or view it on GitHub.
from facetracker.
Related Issues (20)
- Face substitution including the forehead HOT 2
- c-api is outdated, small changes can be made to run with opencv3.0 HOT 1
- Hi there is there a way to run this code in windows , visual studio HOT 2
- coordinates 2d from an determined point HOT 1
- make
- How can I train my own model? HOT 1
- CPU perfomance ios HOT 1
- Explanation for tracking profile face HOT 1
- face2.tracker calculation HOT 1
- /usr/local/lib/libopencv_core.so:对‘cudaEventRecord’未定义的引用 HOT 1
- it tell me can‘t found "wh" HOT 1
- How to solve the deformation of face
- Calculate the Jacob
- How to improve the precision
- OpenCV with withdows 7 32bit
- Python version HOT 1
- make error: ‘strcmp’ is not a member of ‘std’ HOT 1
- Is there any way to train the model from face images? HOT 1
- What's math behind the algorithm?
- MacOSX10.14 Build Errors in CLM.cc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facetracker.