Ask Your Question
1

Create_samples, compiling with static libraries, linker error in highgui module, createToolBarEx

asked 2013-10-14 04:38:36 -0600

When compiling the createsamples utility for image vector creation when performing traincascade operation, I wanted to use the static libraries. With other projects this worked perfectly, however, with the create_samples utility, an error is raised at the highgui lib when linking:

1>opencv_highgui245.lib(window_w32.obj) : error LNK2001: unresolved external symbol __imp_CreateToolbarEx
1>C:\Visual Studio Projects\cleaned_software\x64\Release\create_sample_vector.exe : fatal error LNK1120: 1 unresolved externals

Anyone has an idea as how to solve this problem?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-10-14 04:44:21 -0600

Hmm static linking is not always as straightforward it seems. I had to add an extra static lib dependency to comctl32.lib. This solved the problem for me.

Might be interesting in having some sort of guide for these problems...

edit flag offensive delete link more

Comments

I have the same problem with the opencv trunk from 140917. unfortunately I am still missing something after linking to comctl32.lib according to the linker error: opencv_highgui300.lib(window_w32.obj) : error LNK2001: unresolved external symbol cvConvertImage do you perhaps know what is missing?

Christoph Pacher gravatar imageChristoph Pacher ( 2014-09-17 09:30:26 -0600 )edit

hmm if you cannot get to cvConvertImage than you openCV linker settings are not set properly. You should take a look at that first. You do know you are using the OpenCV3.0 build right? It could contain a bug also. 2.4.9 is much safer.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-22 05:53:20 -0600 )edit

Question Tools

Stats

Asked: 2013-10-14 04:38:36 -0600

Seen: 2,126 times

Last updated: Oct 14 '13