Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling using vs2013 no .lib file problem #46

Open
jjjphysics opened this issue Mar 21, 2016 · 30 comments
Open

compiling using vs2013 no .lib file problem #46

jjjphysics opened this issue Mar 21, 2016 · 30 comments

Comments

@jjjphysics
Copy link

compiling issue when i compiling flandmark i must have file clandmark.lib, however I only have clandmark.dll didn't have clandmark.lib file. And at last fail all the compiling.

@uricamic
Copy link
Owner

Hi @jjjphysics,

the .lib files are produced only when BUILD_SHARED_LIBS are set to FALSE.

@jjjphysics
Copy link
Author

Hi @uricamic, thanks for the advise! now I get both .lib file and .dll file. However, when I run the compile_mex.m file I get an error using mex like this
screenshot1 did you know what's the problem?

@uricamic
Copy link
Owner

Hi @jjjphysics,

I cannot read complete error message, but it seems CLandmarkConfig.h is missing in the libclandmark directory. Try to search for it, it should have been generated somewhere, and copy it to the folder. It should help.
However, I should admit I did not encounter such a problem, when I was building it on windows.

@jjjphysics
Copy link
Author

HI @uricamic The ClandmarkConfig.h I have found some where else and copy to the directory. However, this time another message come, I think i definitely have do something wrong, below:

screenshot2
screenshot3
screenshot4
screenshot5
Thanks very much for your help! Do you have compiled matlab file of Clandmark file?

@uricamic
Copy link
Owner

These look weird, I have never tried to compile it on Windows 10, but I guess that shouldn't be a problem. Have you tried to compile the C++ examples and run them? It is not directly connected to your problem with mex files compilation, but if it does not work, then it is an indicator that the problem is really elsewhere...

@jjjphysics
Copy link
Author

@uricamic Yes, the example is didn't work at all. When I double click static_input.exe just flash at shut down nothing come out. So what probably the problem is?

@uricamic
Copy link
Owner

@jjjphysics,

you have to run it from command line and add the required arguments.

@jjjphysics
Copy link
Author

@uricamic I try to type the code static _input.exe CDPM.xml face.jpg but there is no file CDPM.xml can you have some explanation of the screen shot of installation on windows at http://cmp.felk.cvut.cz/~uricamic/clandmark/index.php?page=installation#install_windows
I think maybe is some compiling problem about VS2015? Can you have some easy using package?
Thanks very much for your help!

@uricamic
Copy link
Owner

Hi @jjjphysics,

you can download CDPM.xml as well as other models from the website, section downloads. If this code example works, it means that library was successfully compiled so we can focus on what is the problem with mex compilation.

@jjjphysics
Copy link
Author

Hi @uricamic I tried it fail like this:
screenshot6
so it is the problem of VS2013? or system?
Thanks!

@uricamic
Copy link
Owner

The usage line is telling you what arguments are needed. You are missing there the path to the haarcascade (the folder containing it) before CDPM.xml

@jjjphysics
Copy link
Author

Hi @uricamic Thanks for your advise! right now I can load the flandmark model but it still error like this
screenshot7
Thanks!

@uricamic
Copy link
Owner

Hi @jjjphysics,

I am sorry, the path to the haarcascade fodler has to end with "" otherwise in the code the incorrect path is produced and the cascade is then not loaded (that is what produces this error message). However, it seems that the library is compiled successfully, since the Flandmark was created.

If you need the MATLAB mex files, you can find them compiled here

@jjjphysics
Copy link
Author

Hi @uricamic , Thank you very much for you help it works! see as below but the face center is so far away seems
screenshot9
by the way how do I use the compiled matlab file?
Thank you very much!

@uricamic
Copy link
Owner

Hi @jjjphysics,

if you mean the blue point then it is actually not a center of the face. It inherits the old code for 8 landmarks, where the first landmark was the one corresponding to the face center, so in the picture blue is just the first landmark in the sequence.

To use the mex-files, please check the code snippets on the project homepage.

Btw this example proofs that you successfully compiled the library, so the problem is in the mex compilation. If the precompiled version does not work for you, we will have to check what is wrong in your case...

@happygao
Copy link

happygao commented Jun 7, 2016

@jjjphysics Hi,I met the same question with you,but I do not find the CLandmarkConfig.h,could you tell me which place do you find?

@jjjphysics
Copy link
Author

@happygao I solve this problem by finding the file some where else and copy to the require place. However, after this problem there are some other problems. Finally, I use the compiled version here https://github.com/AmlFawzy/clandmark

@happygao
Copy link

happygao commented Jun 8, 2016

@jjjphysics Thank you very much. I find the file, but there are many other questions with me.I am the beginner of this knowledge. Could you tell me the step of the produce? I have no ideas to do it.

@uricamic
Copy link
Owner

uricamic commented Jun 8, 2016

Hi @happygao,

have you done the cmake configuration procedure? The CLandmarkConfig.h is generated during it somewhere (depending on your system), you can then just search for it within your CLandmark folder.

And do you need just the C++ library, or would you like to use MATLAB or Python interface?

@happygao
Copy link

@uricamic I would like to use MATLAB or Python interface, and I find the file and have done cmake. This is the first time I contact the Clandmark, could you tell me the steps of the procedure please? Thanks.

@uricamic
Copy link
Owner

Hi @happygao,

what operating system do you have and what is your intended application?
If I remember correctly, the Python interface was so far tested only on linux and Mac. The learning scripts are available only for MATLAB so far, though.

If you have compiled CLandmark successfully (you can e.g. try to compile also the C++ examples and run them to check this), next step would be to compile the interface. The procedure depends on the operating system - on linux and Mac it is possible directly from CMake, on windows it is easier to use the compile_mex.m script.

@happygao
Copy link

@uricamic Thank you very much. I have Windows and Linux, I make it on Linux all the time. I want to use in Fae Alignment. Now I have a try to do by your step.

@happygao
Copy link

@uricamic Now I complied on Window 10, CMake Error: File C:/Users/dell/Desktop/clandmark-master(1)/clandmark-master/data/flandmark_model.xml does not exist. I donot find the reason why happend this.

@uricamic
Copy link
Owner

Hi @happygao,
it seems there are some issues with CMake and Windows 10. You can try to compile the library without C++ examples, by turning BUILD_CPP_EXAMPLES OFF. Then the CMake won't try to copy that .xml file. Or you can simply comment out the lines 47 - 49 in the main CMakeLists.txt file.

@happygao
Copy link

happygao commented Jul 3, 2016

@jjjphysics Hi, I used the program which you give me. But when I complied it,the flandmark when build ,it came out "LINK : fatal error LNK1104: 无法打开文件“Debug\clandmark.lib”. I donot know the problem how to solve it. Please help me solve it. Thanks.

@happygao
Copy link

happygao commented Jul 6, 2016

Hello, @uricamic ,I met a question" error C3861:"log2":could not find identifer. " when I build the C++ examples. Could you tell me how to solve this problem?

@uricamic
Copy link
Owner

Hi @happygao,

sorry for that, I always forget to add the header files which are standardly found in linux, but missing in windows. You can solve this issue either by defining the log2 for yourself (see e.g. this or by doing some other workaround. I will fix this in the repository soon (after I return from vacation).

@happygao
Copy link

@uricamic Iam sorry to interrupt when you are in holiday. I will wait you that fix the repository.Thank you.

@happygao
Copy link

Thankyou. @uricamic .The log2 problem has solved.But when build the flandmark, it happens "could not open ..\libclandmark\Debug\flandmark.lib". I see the file, it find no file in it. what problem causes this ?

@uricamic
Copy link
Owner

Hi @happygao,

I am not sure what you mean by "I see the file, it find no file in it" ? If you mean that the flandmark.lib is missing in the ..\libclandmark\Debug\ folder, then check whether flandmark.dll is present. If so, you just need to change BUILD_SHARED_LIBS to OFF and compile again. After this step the .lib files should be also produced.

Btw, I strongly recommend to compile the library in Release mode, for performance reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants