bensondaled / pseyepy

PSEye-py: a python interface to the PS3Eye camera
Apache License 2.0
78 stars 26 forks source link

Compilation error on Windows #6

Closed JunkyByte closed 5 years ago

JunkyByte commented 5 years ago

Hi! I can't compile the library correctly, I'm on windows 10 (on linux had no need of this and opencv was able to access the cameras correctly) and I used anaconda to install python.

I tried to follow the notes you wrote on the setup file (the section for windows) and also your reccomandations on the readme unsuccessfully (I'm really used to compiling C code and I have some difficulties) The error I get is the following

setup.py:48: UserWarning: Setup params not yet fully tested for Windows.
  warnings.warn('Setup params not yet fully tested for Windows.')
running install
running build
running build_py
running build_ext
building 'pseyepy.cameras' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipseyepy/src -Ipseyepy\ext\win\include\libusb-1.0 -IC:\Users\AdryW\Miniconda3\envs\tf_gpu\include -IC:\Users\AdryW\Miniconda3\envs\tf_gpu\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\winrt" /EHsc /Tppseyepy/cameras.cpp /Fobuild\temp.win-amd64-3.7\Release\pseyepy/cameras.obj -std=c++11 -stdlib=libc++
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9002 : ignoring unknown option '-stdlib=libc++'
cameras.cpp
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipseyepy/src -Ipseyepy\ext\win\include\libusb-1.0 -IC:\Users\AdryW\Miniconda3\envs\tf_gpu\include -IC:\Users\AdryW\Miniconda3\envs\tf_gpu\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\winrt" /EHsc /Tppseyepy/src/ps3eye.cpp /Fobuild\temp.win-amd64-3.7\Release\pseyepy/src/ps3eye.obj -std=c++11 -stdlib=libc++
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9002 : ignoring unknown option '-stdlib=libc++'
ps3eye.cpp
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipseyepy/src -Ipseyepy\ext\win\include\libusb-1.0 -IC:\Users\AdryW\Miniconda3\envs\tf_gpu\include -IC:\Users\AdryW\Miniconda3\envs\tf_gpu\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\winrt" /EHsc /Tppseyepy/src/ps3eye_capi.cpp /Fobuild\temp.win-amd64-3.7\Release\pseyepy/src/ps3eye_capi.obj -std=c++11 -stdlib=libc++
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9002 : ignoring unknown option '-stdlib=libc++'
ps3eye_capi.cpp
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:pseyepy/ext/win/lib /LIBPATH:C:\Users\AdryW\Miniconda3\envs\tf_gpu\libs /LIBPATH:C:\Users\AdryW\Miniconda3\envs\tf_gpu\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\um\x64" libusb-1.0.lib /EXPORT:PyInit_cameras build\temp.win-amd64-3.7\Release\pseyepy/cameras.obj build\temp.win-amd64-3.7\Release\pseyepy/src/ps3eye.obj build\temp.win-amd64-3.7\Release\pseyepy/src/ps3eye_capi.obj /OUT:build\lib.win-amd64-3.7\pseyepy\cameras.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\pseyepy\cameras.cp37-win_amd64.lib -std=c++11 -stdlib=libc++
LINK : warning LNK4044: unrecognized option '/std=c++11'; ignored
LINK : warning LNK4044: unrecognized option '/stdlib=libc++'; ignored
cameras.obj : warning LNK4197: export 'PyInit_cameras' specified multiple times; using first specification
   Creating library build\temp.win-amd64-3.7\Release\pseyepy\cameras.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\pseyepy\cameras.cp37-win_amd64.exp
libusb-1.0.lib(core.obj) : error LNK2001: unresolved external symbol __imp__iob
libusb-1.0.lib(windows_winusb.obj) : error LNK2001: unresolved external symbol __imp_sprintf
libusb-1.0.lib(windows_winusb.obj) : error LNK2001: unresolved external symbol __imp_sscanf
build\lib.win-amd64-3.7\pseyepy\cameras.cp37-win_amd64.pyd : fatal error LNK1120: 3 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1120

I see from the log that it is trying to use VS 14.0 while on your notes you pointed out to try to use an older version, could you help me figure out how to actually point to that version during compiling?

Thank you very much!

gabesf commented 2 years ago

Hello @JunkyByte ... Were you able to fix this? Thanks!

JunkyByte commented 2 years ago

@gabesf hello, no, I accessed the cameras using opencv by flashing a custom driver, I followed this as reference https://github.com/psmoveservice/PSMoveService

gabesf commented 2 years ago

Ok! Thank you... I'll take a look. I'm not entirelly sure about what you mean by flashing a custom driver. Is one of the those mentioned in that project?

JunkyByte commented 2 years ago

@gabesf if you follow https://github.com/psmoveservice/PSMoveService/wiki/PSEye-Software-Setup-%28Windows%29 and install custom drivers for windows the cameras should be seen by opencv directly (and also by other applications). I would try the different options from the guide, I think I used the option listed as (B) using libusb but I'm unsure, the guide changed a bit in the last few years.

gabesf commented 2 years ago

Thanks! I'll try that tomorrow. Have a nice sunday.

AlexSHamilton commented 2 years ago

@gabesf , Hello, Please tell me if you managed to connect cameras and make them visible in OpenCV?

gabesf commented 2 years ago

Yes, I did. A more experienced friend of mine helped me compile the library. Dont remember the exact steps though =.

Em qua., 25 de mai. de 2022 às 23:06, AlexNLeo @.***> escreveu:

@gabesf https://github.com/gabesf , Hello, Please tell me if you managed to connect cameras and make them visible in OpenCV?

— Reply to this email directly, view it on GitHub https://github.com/bensondaled/pseyepy/issues/6#issuecomment-1138065299, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANPMDDYXZSQ6QI3V7YWJPR3VL3MBNANCNFSM4HPU43FA . You are receiving this because you were mentioned.Message ID: @.***>

-- Atenciosamente, Gabriel Sffair

AlexSHamilton commented 2 years ago

Yes, I did. A more experienced friend of mine helped me compile the library. Dont remember the exact steps though =.

@gabesf Thank you for your reply. I will look for a more experienced friend too. :) Maybe you have the opportunity to share the compiled files with me, what if they work on my computer?

gabesf commented 2 years ago

yes, I'll check my other computer and get back to you. I don't have much info because I made it work but didn't use it in my project afterall.

AlexSHamilton commented 2 years ago

Thanks, I'll wait.

чт, 26 мая 2022 г. в 21:03, gabesf @.***>:

yes, I'll check my other computer and get back to you. I don't have much info because I made it work but didn't use it in my project afterall.

— Reply to this email directly, view it on GitHub https://github.com/bensondaled/pseyepy/issues/6#issuecomment-1138865418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZK5XFVRANZWJSLFHMLCS2DVL64IDANCNFSM4HPU43FA . You are receiving this because you commented.Message ID: @.***>

-- С уважением, Алексей Сидоров. +7(903)345-9889

ZackYounger commented 8 months ago

No chance either of you still have the source code....? Can't install this library for the life of me and although I could make the cameras work with the custom drivers mentioned earlier in the thread, this does not work for multiple cameras. Would be super appreciative if you did!

JunkyByte commented 8 months ago

Hi @ZackYounger, no it's been a few years :p check the issue referenced just above your comment, the guy points out some steps for compilation that might solve the problem... good luck