Code::Blocks Forums

User forums => Help => Topic started by: anti on March 08, 2010, 03:36:22 am

Title: help with error.
Post by: anti on March 08, 2010, 03:36:22 am
using nightly build of code block

trying to compile FaceRec (google if interested)

downloaded ming
 
using xp

using opencv, using FLUID all setup with links to the libraries in the directory bit of build options

mingw32-g++.exe: Settings\Me\Desktop\face\FaceRec\Fl_OpenCV.cxx -o .objs\Fl_OpenCV.o: No such file or directory

am i right in thinking it can't find an object file? if so, how do i create said object file, i'm confused i thought hitting build would create said o's.
Title: Re: help with error.
Post by: stahta01 on March 08, 2010, 04:44:07 am
Do you have spaces, or special characters, in your path to the project?
If yes, try using a path without them.

I suggest turning on full compiler logging.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

My guess it can not find the .cxx file, but not sure I have not gotten that error in years.


Tim S.
Title: Re: help with error.
Post by: anti on March 08, 2010, 04:50:51 am
yay. no spaces fixed that error, and it begins to compile, at which point i get this error:


-------------- Build: default in Face ---------------

Compiling: Fl_OpenCV.cxx
Compiling: FaceRec.cxx
Linking executable: Face.exe
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lfltk
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 9 seconds)
1 errors, 0 warnings
Title: Re: help with error.
Post by: Seronis on March 08, 2010, 09:02:59 am
gcc 3.4.2?   google for TDM GCC and download the bundled installer from the main page and update to 4.4.1.  Works quite well on windows.   Your linker error there says it cant find the  fltk library.  I'm assuming that is http://www.fltk.org/.  Try reading their site (and ask for help on THEIR forums, not here) to make sure its properly installed.
Title: Re: help with error.
Post by: anti on March 09, 2010, 01:37:45 am
hi have requested help on their site and libfltk.a is now on my system.

fixed the error - problem was at code::blocks end (ie yours), basically went to

project>build options>linker settings tab - clicked on lfltk, and edited it to the path C:\face\FaceRec\fltk-1.3.x-r7216\lib because thats where libfltk.a was after i compiled it. this was the issue, code blocks couldn't tell gcc where the lib was because it didn't know because the cbp file didn't have enough info to tell it.

This was because the guy who made the project had his system set up so that just typing lfltk in the linker settings tab linked to the right place, along with the other things he had in there like kernel32 etc.

does anyone know how i make it so code blocks can find lfltk from just having lfltk in the linker settings tab like he did, with the location being  C:\face\FaceRec\fltk-1.3.x-r7216\lib???

thanks for the help you've offered so far BIG KISSES


also if you give me a list of what you want me to use i will download it and try to compile the program with it instead

at the moment i'm using mingw with msys & codeblock, please let me know what versions you want me using and i'll update.



Title: Re: help with error.
Post by: MortenMacFly on March 09, 2010, 06:41:53 am
does anyone know how i make it so code blocks can find lfltk from just having lfltk in the linker settings tab like he did, with the location being  C:\face\FaceRec\fltk-1.3.x-r7216\lib???
As this makes no sense at all: No.
Since the beginning of compilers / linkers you simply need to define where to find resources. If you want to change that - go ahead and grab yourself the sources of GCC and do it yourself. Surely a patch in that direction will be objected by the GCC team.

However, you can use the concept of global variables if you want to have the folder dynamically adjusted once you open th project on another login / computer / platform. Consult the C::B documentation accordingly.
Title: Re: help with error.
Post by: anti on March 09, 2010, 02:37:53 pm
does anyone know how i make it so code blocks can find lfltk from just having lfltk in the linker settings tab like he did, with the location being  C:\face\FaceRec\fltk-1.3.x-r7216\lib???
As this makes no sense at all: No.
Since the beginning of compilers / linkers you simply need to define where to find resources. If you want to change that - go ahead and grab yourself the sources of GCC and do it yourself. Surely a patch in that direction will be objected by the GCC team.

However, you can use the concept of global variables if you want to have the folder dynamically adjusted once you open th project on another login / computer / platform. Consult the C::B documentation accordingly.

is there a global variable for kernel32 library linking? because that works it's just lfltk that didn't, so maybe there's no defined global variable for it.
Title: Re: help with error.
Post by: MortenMacFly on March 09, 2010, 02:46:11 pm
is there a global variable for kernel32 library linking?
Sorry, but I don't get what you want to ask. Are you aware what global variables are?!
Title: Re: help with error.
Post by: anti on March 09, 2010, 03:54:05 pm
if you don't know how to answer the question, or understand it, as you've previously said, that's fine, but try not to be patronising.

i'm interested in getting code blocks projects that link to fltk in project>build options>linker settings to work without being told the exact location.

(http://img59.imageshack.us/img59/6315/tabsettings.jpg)

ie in that box above that tells codeblocks when compiling, what libs to link, code blocks knows where gdi and kernel libs are, without links to the actual folder, a mere mention of the word "kernel32" is enough, but it doesn't know where lfltk is. How do i set this up.?

Title: Re: help with error.
Post by: oBFusCATed on March 09, 2010, 04:10:32 pm
Morten has given you the guide, you have not followed it and then he's guilty?  :shock:

http://lmgtfy.com/?q=codeblocks+global+variables

kernel32.dll is a system lib, fltk is user lib...
Title: Re: help with error.
Post by: anti on March 09, 2010, 04:23:51 pm
Morten has given you the guide, you have not followed it and then he's guilty?  :shock:

http://lmgtfy.com/?q=codeblocks+global+variables

kernel32.dll is a system lib, fltk is user lib...

nobody said anything about being guilty

now we're getting somewhere, does codeblocks link GCC against kernel32.dll? I didn't think it was possible to link against proper dll's, just .a lib files. how does codeblocks know where the system libs are?
Title: Re: help with error.
Post by: anti on March 09, 2010, 04:28:32 pm
global variables seem to be for compiling not linking? i am talking about linking.
Title: Re: help with error.
Post by: oBFusCATed on March 09, 2010, 04:35:41 pm
does codeblocks link GCC against kernel32.dll?
This sentence doesn't have any meaning...

Please read the first two point in C::B's FAQ: http://wiki.codeblocks.org/index.php?title=FAQ // and follow the links!
Title: Re: help with error.
Post by: anti on March 09, 2010, 04:45:45 pm
Does codeblock tell the linker where kernel32.dll is? is what i meant
Title: Re: help with error.
Post by: anti on March 09, 2010, 04:46:46 pm
Does codeblock tell the linker where kernel32.dll is? is what i meant

and if codeblocks DOES do that, how does it know where kernel32.dll is?
Title: Re: help with error.
Post by: oBFusCATed on March 09, 2010, 05:10:02 pm
It doesn't because, "kernel32.lib,dll,a" is a system lib, so it is in the hardcoded folders of GCC/Linker.
There is no need to specify this folders, the compiler will always search them, the same is valid for the includes