Posts: 7
Joined: May 2009
Reputation:
0
I'm attempting to compile XBMC for Windows and I'm getting the following error:
error C2512: 'CFileItem' : no appropriate default constructor available
I actually get a number of errors but I believe they all stem from the above error.
I'm using Visual Studio 2008 and I'm on Vista.
I did a get of the source, installed the DirectX SDK and add the include and library directx paths to my solution.
This is happening during the compile of the XBMC project, the guilib, libPlatinum and UnrarXLib projects all compile with no errors.
Am I missing something obvious?
Posts: 26,215
Joined: Oct 2003
Reputation:
187
We'd need more information - why not post your build log on pastebin or similar?
Posts: 26,215
Joined: Oct 2003
Reputation:
187
2009-05-06, 00:23
(This post was last modified: 2009-05-06, 00:25 by jmarshall.)
Try adding a #include "FileItem.h" somewhere up the top there. Looks like an include order problem.
EDIT: Hmm, nope - FileItem.h is included in PlayList.h which is included in GUIInfoManager.cpp
The default constructor is clearly present in FileItem.h/cpp.
Which branch do you have checked out?
Posts: 1,165
Joined: Jan 2009
Reputation:
2
CrashX
Posting Freak
Posts: 1,165
What solution file are you using ?
Posts: 7
Joined: May 2009
Reputation:
0
I'm using:
XBMC for Windows.sln
in the project\VS2008Express directory
Posts: 2,745
Joined: Oct 2003
Reputation:
1
WiSo
Team-Kodi Developer
Posts: 2,745
The only thing I noticed is that we call CFileItem without the brackets:
m_currentFile = new CFileItem;
IIRC I have this seen before but in this case it works fine for me.
Posts: 7
Joined: May 2009
Reputation:
0
I noticed that to. I put the brackets () in but had the same result.
Posts: 7
Joined: May 2009
Reputation:
0
Well this seems to have worked itself out. So thanks to whoever fixed it.
However it would be kind of nice to know what the problem is, if anyone does know. As others have commented, it looked it should have been fine the way it was.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
and fyi
m_currentFile = new CFileItem;
and
m_currentFile = new CFileItem();
are exactly the same