ofxDlib icon indicating copy to clipboard operation
ofxDlib copied to clipboard

Changed the addon_config to modify includes for VS + tutorial

Open brinoausrino opened this issue 6 years ago • 11 comments

With this updates the includes for the vs project generated with the project generator are correct. The project generator still misses to include the preprocessor flags automatically (see instructions).

So if you want to simply create a vs project compile this fork of the pg -> https://github.com/brinoausrino/projectGenerator

brinoausrino avatar Aug 30 '19 13:08 brinoausrino

Also, to cross reference, this moves #14 forward.

bakercp avatar Aug 31 '19 18:08 bakercp

Sorry for the slow merge on this one. Let me know when it's ready to merge.

bakercp avatar Sep 20 '19 23:09 bakercp

Sorry for the slow merge on this one. Let me know when it's ready to merge.

I changed some path and installed dlib freshly following the instructions. So it should be ready to merge.

brinoausrino avatar Oct 01 '19 09:10 brinoausrino

Sorry for the slow merge on this one. Let me know when it's ready to merge.

I changed some path and installed dlib freshly following the instructions. So it should be ready to merge.

@bakercp

brinoausrino avatar Oct 07 '19 12:10 brinoausrino

Have you tried with CUDA? I assume this does not compile because this PR excludes CUDA related header. Cmake optimizes and automatically copies required header files so we don't need to exclude headers and sources manually.

hiroMTB avatar Oct 07 '19 15:10 hiroMTB

You're right. If you want to use CUDA you need to link the libraries manually. But since there is no option in the PG to activate/deactivate cuda or set some kind of this option it might be easier to do this step manually. I'll add this in the readme as well

brinoausrino avatar Oct 07 '19 15:10 brinoausrino

If you are using CUDA installed PC, Cmake is able to detect CUDA (also MKL) and optimize config.h and .h/.cpp automatically. So we don't need to edit vs properties manually.

Your PR includes lots of ADDON exclude. This is because you copied wrong dlib include folder at the begining. Please try to use original addon_config.mk. It should work.

On Tue, Oct 8, 2019, 12:25 AM Brian Eschrich [email protected] wrote:

You're right. If you want to use CUDA you need to link the libraries manually. But since there is no option in the PG to activate/deactivate cuda or set some kind of this option it might be easier to do this step manually. I'll add this in the readme as well

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bakercp/ofxDlib/pull/30?email_source=notifications&email_token=AABPGAH2ICUQIRAKHZBVVBDQNNIGLA5CNFSM4ISNNWB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAQYG5Y#issuecomment-539067255, or mute the thread https://github.com/notifications/unsubscribe-auth/AABPGAEBVESWRTJJHW2RPEDQNNIGLANCNFSM4ISNNWBQ .

hiroMTB avatar Oct 08 '19 02:10 hiroMTB

Thank you @hiroMTB for reviewing the changes. I changed the includes back to the original config, you're right it was a wrong copy issue. Also I added the CUDA includes, that you could comment in/out if you want to use them. You may have a look if everything works like this? Thanks

brinoausrino avatar Oct 08 '19 07:10 brinoausrino

Thanks! I rember I needed to add more cuda lib files. Like,

ADDON_LIBS += $(CUDA_PATH)/lib/x64/cublas.lib cublasLt.lib cuda.lib cudadevrt.lib cudart.lib cudart_static.lib cudnn.lib cufft.lib cufftw.lib curand.lib cusolver.lib cusolverMg.lib cusparse.lib nppc.lib nppial.lib nppicc.lib nppicom.lib nppidei.lib nppif.lib nppig.lib nppim.lib nppist.lib nppisu.lib nppitc.lib npps.lib nvblas.lib nvgraph.lib nvjpeg.lib nvml.lib nvrtc.lib OpenCL.lib

Can you try this on CUDA installed PC?

Also it might be nice to remove DDLIB_USE_CUDA=1 option and let Cmake detect cuda and turn on this flag automatically.

hiroMTB avatar Oct 08 '19 13:10 hiroMTB

Please take a look at this PR, it might help. https://github.com/bakercp/ofxDlib/pull/31

hiroMTB avatar Oct 08 '19 13:10 hiroMTB

ADDON_LIBS += $(CUDA_PATH)/lib/x64/cublas.lib cublasLt.lib cuda.lib cudadevrt.lib cudart.lib cudart_static.lib cudnn.lib cufft.lib cufftw.lib curand.lib cusolver.lib cusolverMg.lib cusparse.lib nppc.lib nppial.lib nppicc.lib nppicom.lib nppidei.lib nppif.lib nppig.lib nppim.lib nppist.lib nppisu.lib nppitc.lib npps.lib nvblas.lib nvgraph.lib nvjpeg.lib nvml.lib nvrtc.lib OpenCL.lib

added, worked for me

Also it might be nice to remove DDLIB_USE_CUDA=1 option and let Cmake detect cuda and turn on this flag automatically.

automatic detection also worked. Thanks for your comments.

brinoausrino avatar Oct 09 '19 07:10 brinoausrino