1 | initial version |
with static linking (and gcc), the ORDER of the libs (and object files) matters.
since highgui depends on core, it must be:
LIBS = -lopencv_highgui -lopencv_imgproc -lopencv_core -lpthread -lrt -ldl
in the same manner, your test.o has to go before the libs:
$(APPNAME):$(OBJS)
$(CC) $+ $(LIBDIRS) $(LIBS) -o $@ $(OPT)
2 | No.2 Revision |
with static linking (and gcc), the ORDER of the libs (and object files) matters.
since highgui depends on core, it must be:
LIBS = -lopencv_highgui -lopencv_imgproc -lopencv_core -lpthread -lrt -ldl
in the same manner, your test.o has to go before the libs:
$(APPNAME):$(OBJS)
$(CC) $+ $(LIBDIRS) $(LIBS) -o $@ $(OPT)
not sure, if i got the last line right, but i hope, you get the idea:
you have to sort your dependancies, bottom up.
3 | No.3 Revision |
with static linking (and gcc), the ORDER of the libs (and object files) matters.
since highgui depends on core, it must be:
LIBS = -lopencv_highgui -lopencv_imgproc -lopencv_core -lpthread -lrt -ldl
in the same manner, your test.o has to go before the libs:
$(APPNAME):$(OBJS)
$(CC) $+ $(LIBDIRS) $(LIBS) -o $@ $(OPT)
not sure, if i got the last line right, but i hope, you get the idea:
with static linking, you have to sort your dependancies, bottom up.
4 | No.4 Revision |
with static linking (and gcc), the ORDER of the libs (and object files) matters.
since highgui depends on core, it must be:
LIBS = -lopencv_highgui -lopencv_imgproc -lopencv_core -lpthread -lrt -ldl
in the same manner, your test.o has to go before the libs:
$(APPNAME):$(OBJS)
$(CC) $+ $(LIBDIRS) $(LIBS) -o $@ $(OPT)
not sure, if i got the last line right, but i hope, you get the idea:
with static linking, you have to sort your dependancies, bottom up.
last time i tried with 2.4 (no more using that):
g++ -std=c++0x cv.cpp -I ocv/include -L ocv/lib -lopencv_highgui -lopencv_calib3d -lopencv_contrib -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab -lopencv_legacy -lopencv_imgproc -lopencv_core -ljpeg -lpng -ltiff -lrt -lz -lpthread -o cv
(ofc, you will have to adjust library/include paths)
one last thing about jpg/tiff/png: if you use the system libs, it is -ljpeg
, if you use opencv's 3rdparty ones it is: -llibjpeg
5 | No.5 Revision |
with static linking (and gcc), the ORDER of the libs (and object files) matters.
since highgui depends on core, it must be:
LIBS = -lopencv_highgui -lopencv_imgproc -lopencv_core -lpthread -lrt -ldl
in the same manner, your test.o has to go before the libs:
$(APPNAME):$(OBJS)
$(CC) $+ $(LIBDIRS) $(LIBS) -o $@ $(OPT)
not sure, if i got the last line right, but i hope, you get the idea:
with static linking, you have to sort your dependancies, bottom up.
last time i tried with 2.4 (no more using that):
g++ -std=c++0x cv.cpp -I ocv/include -L ocv/lib -lopencv_highgui -lopencv_calib3d -lopencv_contrib -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab -lopencv_legacy -lopencv_imgproc -lopencv_core -ljpeg -lpng -ltiff -lrt -lz -lpthread -o cv
(ofc, you will have to adjust library/include paths)
one last thing about jpg/tiff/png: if you use the system libs, it is -ljpeg
, if you use opencv's 3rdparty ones it is: -llibjpeg
6 | No.6 Revision |
with static linking (and gcc), the ORDER of the libs (and object files) matters.
since highgui depends on core, it must be:
LIBS = -lopencv_highgui -lopencv_imgproc -lopencv_core -lpthread -lrt -ldl
in the same manner, your test.o has to go before the libs:
$(APPNAME):$(OBJS)
$(CC) $+ $(LIBDIRS) $(LIBS) -o $@ $(OPT)
not sure, if i got the last line right, but i hope, you get the idea:
with static linking, you have to sort your dependancies, bottom up.
last time i tried with 2.4 (no more using that):
g++ -std=c++0x cv.cpp -I ocv/include -L ocv/lib -lopencv_highgui -lopencv_calib3d -lopencv_contrib -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab -lopencv_legacy -lopencv_imgproc -lopencv_core -ljpeg -lpng -ltiff -lrt -lz -lpthread -o cv
(ofc, you will have to adjust library/include paths)
one last thing about jpg/tiff/png: if you use the system libs, it is -ljpeg
, if you use opencv's 3rdparty ones ones(i think, that'w what you should do with cross-compiling) it is: -llibjpeg
7 | No.7 Revision |
with static linking (and gcc), the ORDER of the libs (and object files) matters.
since highgui depends on core, it must be:
LIBS = -lopencv_highgui -lopencv_imgproc -lopencv_core -lpthread -lrt -ldl
in the same manner, your test.o has to go before the libs:
$(APPNAME):$(OBJS)
$(CC) $+ $(LIBDIRS) $(LIBS) -o $@ $(OPT)
not sure, if i got the last line right, but i hope, you get the idea:
with static linking, you have to sort your dependancies, bottom up.
last time i tried with 2.4 (no more using that):
g++ -std=c++0x cv.cpp -I ocv/include -L ocv/lib -lopencv_highgui -lopencv_calib3d -lopencv_contrib -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab -lopencv_legacy -lopencv_imgproc -lopencv_core -ljpeg -lpng -ltiff -lrt -lz -lpthread -o cv
(ofc, you will have to adjust library/include paths)
one last thing about jpg/tiff/png: if you use the system libs, it is -ljpeg
, if you use opencv's 3rdparty ones(i think, that'w that's what you should do with cross-compiling) it is: -llibjpeg