943,789 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 5709
  • C RSS
Jan 22nd, 2009
0

Linker Error with Dev-C++

Expand Post »
Hi all!
I'm at work - newly hired - and I'm given this mpeg2 video codec

http://www.mpeg.org/MPEG/video/mssg-...-software.html

and in particular the decoder that exists in the folder mpeg2v12.zip.
It is code c written for gcc, so I decided to download MinGW and DevC/C++. I add all the files to the project and then clicked compile.Compilation always stops though because of errors with the linker:

[Linker error] undefined reference to `__cpu_features_init'
140:8 C:\MPEGORG_CODEC\src\mpeg2dec\spatscal.c ld returned 1 exit status

I am trying to solve this problem the whole day.I tried rebuild all, clean, compile, with all possible combinations but nothing worked.
I noticed though while googling a lot of links reporting linker errors with dev-c++.

I am just started learning C and C++ and I feel very discouraged...
Anybody any idea?


compilation log is attached.
Attached Files
File Type: txt log.txt (3.2 KB, 51 views)
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Alice_Blue is offline Offline
3 posts
since Jan 2009
Jan 22nd, 2009
0

Re: Linker Error with Dev-C++

That error means it can not find the function cpu_features_init() in any of the file it compiled or in any of the libraries it is trying to link.

Check out those warnings -- they might actually be errors which are causing that link problem.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005
Jan 24th, 2009
0

Re: Linker Error with Dev-C++

Could you tell us what include directives you used?
Last edited by Ahmed_I; Jan 24th, 2009 at 8:38 am.
Reputation Points: 14
Solved Threads: 1
Light Poster
Ahmed_I is offline Offline
32 posts
since Nov 2008
Jan 26th, 2009
0

Re: Linker Error with Dev-C++

thanx a lot! i solved my problem - actually I don't know what was exactly.It just took me a day, of trying, and all of a sudden..

it might have been a small unintentional change to my code, who knows...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Alice_Blue is offline Offline
3 posts
since Jan 2009
Oct 31st, 2010
0
Re: Linker Error with Dev-C++
Hi ,
I too have face same prob. It happens when there is already mingw32 already installed on your computer.

The solution is to mingw32 from add remove problem and delete its folder from C drive.

May be u need to re install Dev and hopefully probelm will vanish
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jainpratik2 is offline Offline
7 posts
since Oct 2010
Nov 1st, 2010
0
Re: Linker Error with Dev-C++
>>May be u need to re install Dev and hopefully probelm will vanish

Forget Dev-C++ because it has not been updated for quite a few years now. It's officially dead.

Get Code::Blocks with MinGW compiler (its all in one install package). You might want to uninstall Dev-C++ first.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: smtp socket in C
Next Thread in C Forum Timeline: Problem with two strings not being equal.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC