Open Taprik opened 1 year ago
The error is a conflict between EDSDK itself and Windows SDK, i.e. not a conflict from the code in ofxCanon or openFrameworks. I'd suggest to try a different version of EDSDK (e.g. the readme for ofxCanon mentions versions which have been tested to work). I quickly checked my EDSDKTypes.h that I'm using here and there isn't an enum entry called simply 'Unknown' that would have this conflict (sadly, i couldn't find the version number that I'm using, but it's definitely after R5 support).
Suggestion: try earlier (or later) versions of EDSDK
Dear Elliotwoods, You're fast! I'm using a pretty recent version (the 13.13 version). I'm successfully using it with ofxEdsdk also. the enum is at line 842 of the file edsdktypes.h and 7811 of winioctl.h. Same name but not the same enum ... `/----------------------------------------------------------------------------- ObjectFormat Code -----------------------------------------------------------------------------/ typedef enum { Unknown = 0x00000000, Jpeg = 0x3801, CR2 = 0xB103, MP4 = 0xB982, CR3 = 0xB108, HEIF_CODE = 0xB10B, } EdsObjectFormat;
I search the web about any error related to this and I found nothing I can understand `
can you just rename the enum and get it working? if it works on ofxEdsdk it's probably because the include order is different somehow and then the two enums don't hit each other
this kind of error is fixed with c++'s class enum
, but it looks like this code is trying to be C compliant
hint : I won't attempt to 'properly' fix this until I hit this issue myself at the point where I'm actively developing something in oF anyway :)
Thanks elliotwoods I rename the enum and it works. Cheers
I've used this addon with of 0.10 and lately try to use it with of 0.11.2 I've built my project in 2 ways and I have th same errors for both of them
Erreur C2365 'Unknown' : redéfinition ; la précédente définition était 'énumérateur' (compilation du fichier source src\ofApp.cpp) Calibrage_Firefly c:\users\psuchet\documents\devel\of_v0.11.0_vs2017_release\addons\ofxcanon\libs\edsdk\header\edsdktypes.h 847 Erreur C2365 'Unknown' : redéfinition ; la précédente définition était 'énumérateur' (compilation du fichier source src\main.cpp) Calibrage_Firefly c:\users\psuchet\documents\devel\of_v0.11.0_vs2017_release\addons\ofxcanon\libs\edsdk\header\edsdktypes.h 847
If I put the include of ofxCanon before the include of ofMain the error isErreur C2365 'Unknown' : redéfinition ; la précédente définition était 'énumérateur' (compilation du fichier source src\ofApp.cpp) Calibrage_Firefly c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winioctl.h 7811 Erreur C2365 'Unknown' : redéfinition ; la précédente définition était 'énumérateur' (compilation du fichier source src\main.cpp) Calibrage_Firefly c:\users\psuchet\documents\devel\of_v0.11.0_vs2017_release\addons\ofxcanon\libs\edsdk\header\edsdktypes.h 847
'Unknown seems to be redefined Did I miss something ? or is of 0.11.0 not supported ?