Page 1 of 1

Building exe

Posted: Mon Jun 27, 2011 12:41 am
by nadvi
As-Salam-u-alicum

I am new to codelite. Before that I have used Borland C++, Code::Blocks and VS 2010 extendibly. I switch here for its small footprint as portable in usb stick.

But now i am facing a problem . I am doing an assignment with opencv. I configure it and it builds the workspace/projects successfully but do not generate any executable rather it generate a dialog with "No executable specified, use `target exec'."message and exit. Please help me .

Thanks For reading.
Nadvi

Re: Building exe

Posted: Mon Jun 27, 2011 9:41 am
by eranif
nadvi wrote:As-Salam-u-alicum
Shalom to you too
nadvi wrote:I configure it and it builds the workspace/projects successfully but do not generate any executable
Please attach the full build log here (copy the build window content into a file and attach it to this thread please)

Eran

Re: Building exe

Posted: Mon Jun 27, 2011 12:54 pm
by nadvi
Code
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

int main( )
{
cv::Mat image;
image = cvLoadImage( img.jpg );

cv::namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
cv::imshow( "Display Image", image );
cv::waitKey(0);
return 0;
}

Build log

----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "CV_wsp.mk""
----------Building project:[ Histogram - Debug ]----------
mingw32-make.exe[1]: Entering directory `C:/Users/Nadvi/Documents/CodeLite/CV/Histogram'
g++ -o ./Debug/Histogram ./Debug/main.o -L. -LT:/OpenCV2.3/lib -lT:/OpenCV2.3/include/opencv2
t:/codelite/mingw-4.4.1/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot find -lT:/OpenCV2.3/include/opencv2
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [Debug/Histogram] Error 1
mingw32-make.exe[1]: Leaving directory `C:/Users/Nadvi/Documents/CodeLite/CV/Histogram'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
0 errors, 0 warnings

Debug Log
Using gdbinit file: C:\Users\Nadvi\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\Users\Nadvi\Documents\CodeLite\CV\Histogram
Launching gdb from : C:/Users/Nadvi/Documents/CodeLite/CV/Histogram/Debug
Starting debugger : gdb --command="C:\Users\Nadvi\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi "./Histogram"
DEBUG>>set new-console on
DEBUG>>set unwindonsignal on
DEBUG>>set breakpoint pending on
DEBUG>>catch throw
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print elements 200
Debug session started successfully!
DEBUG>>00000001-exec-arguments
DEBUG>>00000002-exec-run
DEBUG>>~"GNU gdb (GDB) 7.0.1\n"
GNU gdb (GDB) 7.0.1
DEBUG>>~"Copyright (C) 2009 Free Software Foundation, Inc.\n"
Copyright (C) 2009 Free Software Foundation, Inc.
DEBUG>>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
DEBUG>>~"This is free software: you are free to change and redistribute it.\n"
This is free software: you are free to change and redistribute it.
DEBUG>>~"There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n"
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
DEBUG>>~"and \"show warranty\" for details.\n"
and "show warranty" for details.
DEBUG>>~"This GDB was configured as \"mingw32\".\n"
This GDB was configured as "mingw32".
DEBUG>>~"For bug reporting instructions, please see:\n"
For bug reporting instructions, please see:
DEBUG>>~"<http://www.gnu.org/software/gdb/bugs/>...\n"
<http://www.gnu.org/software/gdb/bugs/>...
DEBUG>>&"./Histogram: No such file or directory.\n"
DEBUG>>&"set new-console on\n"
DEBUG>>^done
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>^done
DEBUG>>&"set breakpoint pending on\n"
DEBUG>>^done
DEBUG>>&"catch throw\n"
DEBUG>>&"No symbol table is loaded. Use the \"file\" command.\n"
DEBUG>>~"Catchpoint 1 (throw)\n"
Catchpoint 1 (throw)
DEBUG>>^done
DEBUG>>&"set width 0\n"
DEBUG>>^done
DEBUG>>&"set height 0\n"
DEBUG>>^done
DEBUG>>&"set print elements 200\n"
DEBUG>>^done
DEBUG>>00000001^done
DEBUG>>00000002^error,msg="No executable specified, use `target exec'."
DEBUG>>00000003-var-update "*"
DEBUG>>00000003^done,changelist=[]
Debug session ended
No executable specified, use `target exec'.

Re: Building exe

Posted: Mon Jun 27, 2011 2:21 pm
by eranif
nadvi wrote: t:/codelite/mingw-4.4.1/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot find -lT:/OpenCV2.3/include/opencv2
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [Debug/Histogram] Error 1
mingw32-make.exe[1]: Leaving directory `C:/Users/Nadvi/Documents/CodeLite/CV/Histogram'
Your project did not link successfully
You need to specify the OpenCV libraries and paths in the project settings dialog under the Linker page.
nadvi wrote:----------Build Ended----------
0 errors, 0 warnings
This is a bug in codelite which fails to identify link errors as errors.


Eran