Author Topic: failure with the latest build  (Read 2963 times)

pranay_varma

  • Guest
failure with the latest build
« on: February 23, 2007, 06:15:30 am »
Compiling: main.cpp
Linking console executable: C:\pran\console.exe
/mingw/lib/crt2.o:crt1.c:(.text+0x16a): undefined reference to `__cpu_features_init'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

Could u let me know if there is a way out?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: failure with the latest build
« Reply #1 on: February 23, 2007, 06:29:08 am »
You forgot to install MinGW Runtime Libraries. That's why it's complaining. ;)

Regards,

Biplab
Be a part of the solution, not a part of the problem.

pranay_varma

  • Guest
Re: failure with the latest build
« Reply #2 on: February 23, 2007, 10:26:17 am »
Thanks for responding.

I had done a nm *.a|grep cpu_features after sending the email

to make sure that the symbol was there in the libraries.

I ended up trying to find the library in which it was declared:

sh-3.2$ for i in *.a
> do
> nm $i|grep cpu_features > /dev/null
> if [ $? = 0 ]
> then
> echo $i
> fi
> done
libmingw32.a
libmingwex.a


I, then, manually added this library in the Linker section.

I would expect the libraries to be automatically included, especially because the thing generating the executable generating the error is in the same path.

I had also added LD_LIBRARY_PATH in the environment variable to no avail. Perhaps the linker option for library path may work. For now, I have added the library itself to the linker set of libraries.

Pranay


Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: failure with the latest build
« Reply #3 on: February 23, 2007, 10:41:21 am »
Download MinGW Runtime library from the following link.

Quote
http://prdownloads.sourceforge.net/mingw/mingw-runtime-3.11.tar.gz?download

Extract the package in C:\MinGW directory or wherever you've installed MinGW. This package comes with crt2.o and other necessary C Runtime Libraries. This will solve your problem. :)

You don't need to do any other changes after the wizard generates project file.
Be a part of the solution, not a part of the problem.