Closed lucychen0103 closed 2 years ago
Thank you for your sharing! But here I met a problem that the computer can not find the libjpeg.
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
JPEG_LIBRARY (ADVANCED)
linked by target "openpano" in directory /Users/jeremy.lou/Desktop/git/OpenPano-master/src
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Although I installed it through brew, it is still not working.
Then I tried gcc -ljpeg
, and get
ld: library not found for -ljpeg
I also tried gcc -ljpeg -L /opt/homebrew/Cellar/jpeg/9e/lib/
then I got
Undefined symbols for architecture arm64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64
I am not sure how to fix it.
Thank you for your sharing! But here I met a problem that the computer can not find the libjpeg.
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) -- Configuring done CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: JPEG_LIBRARY (ADVANCED) linked by target "openpano" in directory /Users/jeremy.lou/Desktop/git/OpenPano-master/src -- Generating done CMake Generate step failed. Build files cannot be regenerated correctly.
Although I installed it through brew, it is still not working. Then I tried
gcc -ljpeg
, and getld: library not found for -ljpeg
I also tried
gcc -ljpeg -L /opt/homebrew/Cellar/jpeg/9e/lib/
then I gotUndefined symbols for architecture arm64: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture arm64
I am not sure how to fix it.
Fixed by specifying the path to jpeg lib cmake -DJPEG_LIBRARY:PATH=/opt/homebrew/Cellar/jpeg/9e/lib/libjpeg.a -DJPEG_INCLUDE_DIR:PATH=/opt/homebrew/Cellar/jpeg/9e/include ..
But I still don't know why cmake can't find it by default
This took too long for me to figure out, so I'm going to show the rest of you how to do it.
To compile:
To run:
Have fun!