Author Topic: mingw32-g++.exe: No such file or directory  (Read 5478 times)

Offline MB

  • Multiple posting newcomer
  • *
  • Posts: 12
mingw32-g++.exe: No such file or directory
« on: July 15, 2006, 01:12:21 pm »
CB Nightly 10-Jul-06, GCC 3.4.5, MSys 1.0.10, MinGW

If I add the following:

../lib/comctl32.Lib

to Global compiler settings->Linker->Link Libraries then the application links correctly.

If I instead change the line to comctl32.Lib and add the lib directory:

../lib
or ../lib/
or ../../lib
or ../../lib/
or the full path: D:\Projects\Coding-CodeBlocks\Projects\lib

to Global compiler settings->Directories->Linker then I get the following error:

mingw32-g++.exe: comctl32.Lib: No such file or directory

In other words, if I link directly to the library, no problems. But if I instead let mingw32-g++.exe find the .lib itself it doesn't work even though the lib directory has been added to Directories->Linker.

Does anybody know whether this is a bug or something else?

Thanks
« Last Edit: July 15, 2006, 01:21:18 pm by MB »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5207
Re: mingw32-g++.exe: No such file or directory
« Reply #1 on: July 15, 2006, 01:51:50 pm »
could you try it again with a nightly from 13 july 2006 or more recent.
In that nightly I have changed something wrt link libraries on the global compiler settings level. Maybe it will help.
You can also turn on the compiler settings the 'other' tab, to have CB show the full command, this might give more information also, to see if the command itself is correct.


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: mingw32-g++.exe: No such file or directory
« Reply #2 on: July 15, 2006, 02:01:02 pm »
MinGW doesn't use .lib files, but .a files.
Try and pass it comctl32 (without extension). It will pick whatever is right, if MinGW is installed correctly.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MB

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: mingw32-g++.exe: No such file or directory
« Reply #3 on: July 15, 2006, 02:35:00 pm »
I installed the latest CB build and it still didn't work.
I then tried to remove the .lib extensions and it now links correctly :)

So it turns out that mingw32-g++.exe can handle .lib files without adding the .lib extension - which I didn't know :oops:

(Yes mingw32-g++.exe does handle .lib files - I am linking with the latest DirectX libs straight from Microsoft).

Thanks for the help - much appreciated! :)
« Last Edit: July 15, 2006, 02:37:19 pm by MB »