Note that there are some explanatory texts on larger screens.

plurals
  1. POg++ compile multiple files
    primarykey
    data
    text
    <p>I'got a problem with <strike>compiling</strike> linking of a program with multiple files by g++ (I usually use vstudio, but...).</p> <ol> <li><p>If I use only main.cpp (and include appropriate header files for openCV), everything is ok with</p> <pre><code>g++ main.cpp -o main -I"C:\OpenCV2.1\include\opencv" -L"C:\OpenCV2.1\lib" -lcxcore210 -lcv210 -lhighgui210 </code></pre></li> <li><p>If I have main.cpp and some otherfile.cpp (both need openCV) and use</p> <pre><code>g++ main.cpp otherfile.cpp -o main -I"C:\OpenCV2.1\include\opencv" -L"C:\OpenCV2.1\lib" -lcxcore210 -lcv210 -lhighgui210 </code></pre> <p>it simply doesn't work and I got</p> <pre><code>c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: warning: a uto-importing has been activated without --enable-auto-import specified on the c ommand line. This should work unless it involves constant data structures referencing symbols from auto-imported DLLs. C:\Users\ONDEJM~1\AppData\Local\Temp\ccNisCoC.o:main.cpp:(.text+0x16d0): undefin ed reference to `cv::Mat::Mat(_IplImage const*, bool)' C:\Users\ONDEJM~1\AppData\Local\Temp\ccNisCoC.o:main.cpp:(.text+0x16f1): undefin ed reference to `cv::FAST(cv::Mat const&amp;, std::vector&lt;cv::KeyPoint, std::allocat or&lt;cv::KeyPoint&gt; &gt;&amp;, int, bool)' C:\Users\ONDEJM~1\AppData\Local\Temp\ccNisCoC.o:main.cpp:(.text$_ZN2cv3Mat7relea seEv[cv::Mat::release()]+0x3f): undefined reference to `cv::fastFree(void*)' collect2: ld returned 1 exit status </code></pre></li> </ol> <p>What am I doing wrong?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload