snowiow / SIFT

C++ Implementation of the SIFT algorithm
MIT License
35 stars 12 forks source link

error C2873: 'u8_t' : symbol cannot be used in a using-declaration #15

Open padaliyajay opened 7 years ago

padaliyajay commented 7 years ago

Hi, I am PHP developer. i have only basic knowledge about c++ language. I want to use command line SIFT algoritham in PHP. But i am getting following error while compiling in visual studio 2012. please suggest me

compile-error.txt

Dgame commented 7 years ago

SIFT is using C++11/C++14 features which apparently aren't supported from your current IDE. I recommend Clion. A cmake file is already there: https://github.com/snowiow/SIFT/blob/master/CMakeLists.txt

padaliyajay commented 7 years ago

Hi Dgame, As per your recommendation, i have install Clion 2017.1, And created new project with c++14. After that build and Run SIFT library, but not got success to run.

Output after Build: build-sift.txt

Output after RUN, go to "Run->Run sift": run-sift.txt

padaliyajay commented 7 years ago

I am getting following error while run sift in Clion. please help me, I am not able to solve. If you need more detail regarding this issue, then please tell me.

mingw32-make.exe[3]: *** No rule to make target 'C:/conda3/envs/_build_placehold_placehold_placehold_placehold_placehold_placehol/Library/lib/libjpeg.lib', needed by 'sift.exe'. Stop.

full-log-regrading-this-error.txt

Dgame commented 7 years ago

It seems that you don't have all needed lib-files. @snowiow Are those lib files public?

padaliyajay commented 7 years ago

Which lib-files? i don't understand

padaliyajay commented 7 years ago

we will be always thankful for you, if you create pre-build binary of SIFT-master for windows and linux

snowiow commented 7 years ago

You will need to have following third party libraries installed to be able to build this project:

padaliyajay commented 7 years ago

there all library already installed, but not able to build, I am getting same error as like above

snowiow commented 7 years ago

I don't have windows installed, so I can't provide you an exe. But somehow your mingw environment is missing the libjpeg.lib. You should have a look, if the lib is in place. If it is, your build procedure misses to link the library. Add this to your argument list: -ljpeg.

padaliyajay commented 7 years ago

how can i find libjpeg.lib? is this file of separate package? If missing how can i get from and install? how can i add -1jpeg in argument list. please suggest me as beginner. i am a new in cmake project. i have only basic knowledge of c++. my goal is not to create any new project in c++. actually i am PHP developer and want to run SIFT-master(sift.exe) by command line in my PHP project. Currently, In my system i have installed following require components.

I have try some solution from this link. but getting error C:\MinGW\bin\sed.exe: -e expression #1, char 1: unknown command: C

snowiow commented 7 years ago

I think the mingw distro needs it's own packages, because it's a distro on it's own. If you've installed the libraries for windows it could be the case that the make utility inside of mingw doesn't know about those libraries. (Just an assumption).

A bit of background about this project: It was made in a very short period of time, during an university project. We kept the code online, so other people, who intend to implement it, get a glimpse on how they could do it. That said, this implementation is just experimental. I wouldn't suggest running this program in any kind of productive environment, because it's performance is far from perfect. It already needs way above 10 minutes for calculating the features on only medium sized pictures. Have a look at this small benchmark. On wallpaper sized images, this algorithm could run for days.

If this isn't important to you, I can try to provide an exe by setting up a windows VM. Otherwise I suggest, you will have a look for more production ready implementations of this algorithm.

padaliyajay commented 7 years ago

No problem with time, because all my image size is less than 200px. I am facing so many problem to create exe, because i am new in CMake, all my problem will be fix if you create exe for window and linux. thank you

snowiow commented 7 years ago

I've created a windows machine and downloaded mingw etc. I'm getting the same error as you now. It seems to be a problem with vigra. The missing lib is in the vigra/lib/ directory. But the path it is searching for is pretty strange. I will have a look into this later this week, if I got the time. But you can go on from here as well if you got any idea.

snowiow commented 7 years ago

I forgot to mention. The path looks like it is a virtual environment for anaconda ( which is a python distribution). The vigra site says something about this:

VIGRA Python bindings for Python 3.5 can be downloaded via the anaconda package manager. Set up and activate a Python 3.5 environment and call

    conda install -c ukoethe vigra=1.11.1

But normally we don't need those python bindings, because we are using the c++ version.

snowiow commented 7 years ago

Just tried to satisfy that location. Create the path C:/conda3/envs/_build_placehold_placehold_placehold_placehold_placehold_placehol/Library/ and copy everything from inside of the vigra directory into that Library directory. Afterwards the error doesn't occur anymore. I still have some issues with opencv. But maybe you can build it sucessfully now.

padaliyajay commented 7 years ago

Hello snowiow, thank you for great support,

As per your suggestion, i have created that missing directory and copied all files from vigra to that directory, after that i got success to fix that 'libjpeg.lib' missing error. but now i am getting new following error. please suggest me. c:\mingw\x86_64-w64-mingw32\include\crtdefs.h:35:1: error: '__MINGW_EXTENSION' does not name a type; did you mean '__MINGW32_VERSION'? __MINGW_EXTENSION typedef unsigned __int64 size_t;

run-sift-master.txt

snowiow commented 7 years ago

Ive provided an executable under bin/windwos_x86. I'm still getting this error: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information., when I run the app with anything else than the --help argument, because I'm missing something in my environment, but maybe it's working for you.

padaliyajay commented 7 years ago

Hello snowiow, I have try in my system, but got error 0xc000007b. Thank you for support, i can understand. You are too busy although however you have given me time to solve this issue.