Author Topic: help with error.  (Read 12864 times)

Offline anti

  • Single posting newcomer
  • *
  • Posts: 9
help with error.
« 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: help with error.
« Reply #1 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.
« Last Edit: March 08, 2010, 04:47:13 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline anti

  • Single posting newcomer
  • *
  • Posts: 9
Re: help with error.
« Reply #2 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

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: help with error.
« Reply #3 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.

Offline anti

  • Single posting newcomer
  • *
  • Posts: 9
Re: help with error.
« Reply #4 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.



« Last Edit: March 09, 2010, 01:40:30 am by anti »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: help with error.
« Reply #5 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline anti

  • Single posting newcomer
  • *
  • Posts: 9
Re: help with error.
« Reply #6 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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: help with error.
« Reply #7 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?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline anti

  • Single posting newcomer
  • *
  • Posts: 9
Re: help with error.
« Reply #8 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.



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.?


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: help with error.
« Reply #9 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...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline anti

  • Single posting newcomer
  • *
  • Posts: 9
Re: help with error.
« Reply #10 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?

Offline anti

  • Single posting newcomer
  • *
  • Posts: 9
Re: help with error.
« Reply #11 on: March 09, 2010, 04:28:32 pm »
global variables seem to be for compiling not linking? i am talking about linking.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: help with error.
« Reply #12 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!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline anti

  • Single posting newcomer
  • *
  • Posts: 9
Re: help with error.
« Reply #13 on: March 09, 2010, 04:45:45 pm »
Does codeblock tell the linker where kernel32.dll is? is what i meant

Offline anti

  • Single posting newcomer
  • *
  • Posts: 9
Re: help with error.
« Reply #14 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?
« Last Edit: March 09, 2010, 04:48:38 pm by anti »