[GH-ISSUE #48] fatal error: jpeglib.h: No such file or directory - Windows 10 - How to install libjpeg-turbo #39

Closed
opened 2026-03-02 04:08:56 +03:00 by kerem · 11 comments
Owner

Originally created by @toom94 on GitHub (Nov 8, 2023).
Original GitHub issue: https://github.com/gen2brain/cam2ip/issues/48

Hi,

I get an error when compiling on windows 10.

image

libjpeg-turbo installed
libjpeg-turbo-2.0.0-gcc.exe
path:
image

I have no idea what's wrong, please help

Originally created by @toom94 on GitHub (Nov 8, 2023). Original GitHub issue: https://github.com/gen2brain/cam2ip/issues/48 Hi, I get an error when compiling on windows 10. ![image](https://github.com/gen2brain/cam2ip/assets/36904439/e0088469-51a6-4d47-8253-b77127d0eef4) libjpeg-turbo installed libjpeg-turbo-2.0.0-gcc.exe path: ![image](https://github.com/gen2brain/cam2ip/assets/36904439/b7661487-08cc-4be0-bacf-dcfb794f8d4b) I have no idea what's wrong, please help
kerem closed this issue 2026-03-02 04:08:56 +03:00
Author
Owner

@gen2brain commented on GitHub (Nov 8, 2023):

Use -tags jpeg to build without CGO. Everything is in README, and you can search issues for many similar "issues".

<!-- gh-comment-id:1801646390 --> @gen2brain commented on GitHub (Nov 8, 2023): Use `-tags jpeg` to build without CGO. Everything is in README, and you can search issues for many similar "issues".
Author
Owner

@toom94 commented on GitHub (Nov 8, 2023):

--tags jpeg doesn't work for my camera. I need to build this with CV2. None of the previous issues solve my problem, please give me the correct instructions to install libjpeg-turbo on windows.

<!-- gh-comment-id:1801696314 --> @toom94 commented on GitHub (Nov 8, 2023): --tags jpeg doesn't work for my camera. I need to build this with CV2. None of the previous issues solve my problem, please give me the correct instructions to install libjpeg-turbo on windows.
Author
Owner

@gen2brain commented on GitHub (Nov 8, 2023):

Sorry, I have no idea how to install something on Windows. I cross-compile from Linux. You are looking for general instructions, i.e. for MinGW, for msys, whatever you are using, or just install it anywhere and point CGO_CFLAGS/CGO_LDFLAGS. Basic C knowledge about compilation is required.

<!-- gh-comment-id:1801703879 --> @gen2brain commented on GitHub (Nov 8, 2023): Sorry, I have no idea how to install something on Windows. I cross-compile from Linux. You are looking for general instructions, i.e. for MinGW, for msys, whatever you are using, or just install it anywhere and point CGO_CFLAGS/CGO_LDFLAGS. Basic C knowledge about compilation is required.
Author
Owner

@gen2brain commented on GitHub (Nov 8, 2023):

Btw. -tags jpeg has nothing to do with the camera, opencv or not. You can build with OpenCV and with -tags jpeg, i.e. native Go image/jpeg encoder.

<!-- gh-comment-id:1801707268 --> @gen2brain commented on GitHub (Nov 8, 2023): Btw. `-tags jpeg` has nothing to do with the camera, opencv or not. You can build with OpenCV and with `-tags jpeg`, i.e. native Go `image/jpeg` encoder.
Author
Owner

@toom94 commented on GitHub (Nov 8, 2023):

-tags jpeg returns:

socket: read: camera: can not retrieve frame: EOF
image

<!-- gh-comment-id:1801771171 --> @toom94 commented on GitHub (Nov 8, 2023): -tags jpeg returns: socket: read: camera: can not retrieve frame: EOF ![image](https://github.com/gen2brain/cam2ip/assets/36904439/e26b4ac6-6f2c-4723-8014-e9a6c4dd8ac2)
Author
Owner

@gen2brain commented on GitHub (Nov 8, 2023):

You said you want to build for OpenCV, so add -tags cv2 or cv4. But then you will need libraries and headers installed, and you already failed with libjpeg which is much simpler.

<!-- gh-comment-id:1801774012 --> @gen2brain commented on GitHub (Nov 8, 2023): You said you want to build for OpenCV, so add -tags cv2 or cv4. But then you will need libraries and headers installed, and you already failed with libjpeg which is much simpler.
Author
Owner

@toom94 commented on GitHub (Nov 8, 2023):

mam zainstalowane opencv w wersji opencv-2.4.13

mam libjpeg-turbo w wersji: libjpeg-turbo-2.0.4-vc64.exe

mama ustawione parametry go env:
image

I have paths:
image

<!-- gh-comment-id:1801802303 --> @toom94 commented on GitHub (Nov 8, 2023): mam zainstalowane opencv w wersji opencv-2.4.13 mam libjpeg-turbo w wersji: libjpeg-turbo-2.0.4-vc64.exe mama ustawione parametry go env: ![image](https://github.com/gen2brain/cam2ip/assets/36904439/e14cd1a2-efea-464e-974d-682fb8176ce7) I have paths: ![image](https://github.com/gen2brain/cam2ip/assets/36904439/206c015d-f32c-4106-82c4-8860faa0550c)
Author
Owner

@toom94 commented on GitHub (Nov 8, 2023):

ok, it worked, I built it with cv2 - but the application closes without any error... how can I find out the reason for closing?
cloase_app

<!-- gh-comment-id:1801944251 --> @toom94 commented on GitHub (Nov 8, 2023): ok, it worked, I built it with cv2 - but the application closes without any error... how can I find out the reason for closing? ![cloase_app](https://github.com/gen2brain/cam2ip/assets/36904439/6839cd24-6642-41d3-984b-3986346e9439)
Author
Owner

@gen2brain commented on GitHub (Nov 8, 2023):

Start the terminal first, and run it from terminal, so it stays when it crashes.

<!-- gh-comment-id:1801947902 --> @gen2brain commented on GitHub (Nov 8, 2023): Start the terminal first, and run it from terminal, so it stays when it crashes.
Author
Owner

@toom94 commented on GitHub (Nov 8, 2023):

doesn't write anything
image

<!-- gh-comment-id:1801961095 --> @toom94 commented on GitHub (Nov 8, 2023): doesn't write anything ![image](https://github.com/gen2brain/cam2ip/assets/36904439/a97a1e0b-70b1-4080-a9c6-1fa57e9ced11)
Author
Owner

@toom94 commented on GitHub (Nov 13, 2023):

I managed to get something more:
image

Have you encountered such a problem?

<!-- gh-comment-id:1807665336 --> @toom94 commented on GitHub (Nov 13, 2023): I managed to get something more: ![image](https://github.com/gen2brain/cam2ip/assets/36904439/8ede6b7d-8f0d-4402-b293-e5397450272f) Have you encountered such a problem?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cam2ip#39
No description provided.