compile error :(

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
d0t
Posts: 4
Joined: 2004-12-16 01:42

compile error :(

Post by d0t » 2004-12-16 01:43

well after battling with the source i got most of the compile errors fixed... but i still get these:

Code: Select all

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1438) : error C2664: 'MDITabChildWindowImpl<T,C>::Create' : cannot convert parameter 2 from 'WTL::_U_RECT' to 'ATL::_U_RECT'
        with
        [
            T=PrivateFrame,
            C=16776960
        ]
        No constructor could take the source type, or constructor overload resolution was ambiguous
        c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1428) : while compiling class-template member function 'HWND WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>::CreateEx(HWND,WTL::_U_RECT,LPCTSTR,DWORD,DWORD,LPVOID)'
        with
        [
            T=PrivateFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\FlatTabCtrl.h(635) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>' being compiled
        with
        [
            T=PrivateFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\PrivateFrame.h(37) : see reference to class template instantiation 'MDITabChildWindowImpl<T,C>' being compiled
        with
        [
            T=PrivateFrame,
            C=16776960
        ]
UPnP.cpp
TreePropertySheet.cpp
c:\DCPPSrc\windows\TreePropertySheet.h(33) : error C2664: 'WTL::CPropertySheetImpl<T>::CPropertySheetImpl(WTL::_U_STRINGorID,UINT,HWND)' : cannot convert parameter 1 from 'ATL::_U_STRINGorID' to 'WTL::_U_STRINGorID'
        with
        [
            T=TreePropertySheet
        ]
        No constructor could take the source type, or constructor overload resolution was ambiguous
TextFrame.cpp
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1438) : error C2664: 'MDITabChildWindowImpl<T>::Create' : cannot convert parameter 2 from 'WTL::_U_RECT' to 'ATL::_U_RECT'
        with
        [
            T=TextFrame
        ]
        No constructor could take the source type, or constructor overload resolution was ambiguous
        c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1428) : while compiling class-template member function 'HWND WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>::CreateEx(HWND,WTL::_U_RECT,LPCTSTR,DWORD,DWORD,LPVOID)'
        with
        [
            T=TextFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\FlatTabCtrl.h(635) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>' being compiled
        with
        [
            T=TextFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\TextFrame.h(30) : see reference to class template instantiation 'MDITabChildWindowImpl<T>' being compiled
        with
        [
            T=TextFrame
        ]
SearchFrm.cpp
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1438) : error C2664: 'MDITabChildWindowImpl<T,C>::Create' : cannot convert parameter 2 from 'WTL::_U_RECT' to 'ATL::_U_RECT'
        with
        [
            T=SearchFrame,
            C=16744319
        ]
        No constructor could take the source type, or constructor overload resolution was ambiguous
        c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1428) : while compiling class-template member function 'HWND WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>::CreateEx(HWND,WTL::_U_RECT,LPCTSTR,DWORD,DWORD,LPVOID)'
        with
        [
            T=SearchFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\FlatTabCtrl.h(635) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>' being compiled
        with
        [
            T=SearchFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\SearchFrm.h(41) : see reference to class template instantiation 'MDITabChildWindowImpl<T,C>' being compiled
        with
        [
            T=SearchFrame,
            C=16744319
        ]
QueueFrame.cpp
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1438) : error C2664: 'MDITabChildWindowImpl<T,C>::Create' : cannot convert parameter 2 from 'WTL::_U_RECT' to 'ATL::_U_RECT'
        with
        [
            T=PrivateFrame,
            C=16776960
        ]
        No constructor could take the source type, or constructor overload resolution was ambiguous
        c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1428) : while compiling class-template member function 'HWND WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>::CreateEx(HWND,WTL::_U_RECT,LPCTSTR,DWORD,DWORD,LPVOID)'
        with
        [
            T=PrivateFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\FlatTabCtrl.h(635) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>' being compiled
        with
        [
            T=PrivateFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\PrivateFrame.h(37) : see reference to class template instantiation 'MDITabChildWindowImpl<T,C>' being compiled
        with
        [
            T=PrivateFrame,
            C=16776960
        ]
PropertiesDlg.cpp
c:\DCPPSrc\windows\TreePropertySheet.h(33) : error C2664: 'WTL::CPropertySheetImpl<T>::CPropertySheetImpl(WTL::_U_STRINGorID,UINT,HWND)' : cannot convert parameter 1 from 'ATL::_U_STRINGorID' to 'WTL::_U_STRINGorID'
        with
        [
            T=TreePropertySheet
        ]
        No constructor could take the source type, or constructor overload resolution was ambiguous
PrivateFrame.cpp
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1438) : error C2664: 'MDITabChildWindowImpl<T,C>::Create' : cannot convert parameter 2 from 'WTL::_U_RECT' to 'ATL::_U_RECT'
        with
        [
            T=PrivateFrame,
            C=16776960
        ]
        No constructor could take the source type, or constructor overload resolution was ambiguous
        c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1428) : while compiling class-template member function 'HWND WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>::CreateEx(HWND,WTL::_U_RECT,LPCTSTR,DWORD,DWORD,LPVOID)'
        with
        [
            T=PrivateFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\FlatTabCtrl.h(635) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>' being compiled
        with
        [
            T=PrivateFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\PrivateFrame.h(37) : see reference to class template instantiation 'MDITabChildWindowImpl<T,C>' being compiled
        with
        [
            T=PrivateFrame,
            C=16776960
        ]
MainFrm.cpp
c:\DCPPSrc\windows\TreePropertySheet.h(33) : error C2664: 'WTL::CPropertySheetImpl<T>::CPropertySheetImpl(WTL::_U_STRINGorID,UINT,HWND)' : cannot convert parameter 1 from 'ATL::_U_STRINGorID' to 'WTL::_U_STRINGorID'
        with
        [
            T=TreePropertySheet
        ]
        No constructor could take the source type, or constructor overload resolution was ambiguous
main.cpp
HubFrame.cpp
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1438) : error C2664: 'MDITabChildWindowImpl<T>::Create' : cannot convert parameter 2 from 'WTL::_U_RECT' to 'ATL::_U_RECT'
        with
        [
            T=HubFrame
        ]
        No constructor could take the source type, or constructor overload resolution was ambiguous
        c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1428) : while compiling class-template member function 'HWND WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>::CreateEx(HWND,WTL::_U_RECT,LPCTSTR,DWORD,DWORD,LPVOID)'
        with
        [
            T=HubFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\FlatTabCtrl.h(635) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>' being compiled
        with
        [
            T=HubFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\HubFrame.h(41) : see reference to class template instantiation 'MDITabChildWindowImpl<T>' being compiled
        with
        [
            T=HubFrame
        ]
DirectoryListingFrm.cpp
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1438) : error C2664: 'MDITabChildWindowImpl<T,C>::Create' : cannot convert parameter 2 from 'WTL::_U_RECT' to 'ATL::_U_RECT'
        with
        [
            T=DirectoryListingFrame,
            C=16711935
        ]
        No constructor could take the source type, or constructor overload resolution was ambiguous
        c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\atlframe.h(1428) : while compiling class-template member function 'HWND WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>::CreateEx(HWND,WTL::_U_RECT,LPCTSTR,DWORD,DWORD,LPVOID)'
        with
        [
            T=DirectoryListingFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\FlatTabCtrl.h(635) : see reference to class template instantiation 'WTL::CMDIChildWindowImpl<T,TBase,TWinTraits>' being compiled
        with
        [
            T=DirectoryListingFrame,
            TBase=WTL::CMDIWindow,
            TWinTraits=ATL::CMDIChildWinTraits
        ]
        c:\DCPPSrc\windows\DirectoryListingFrm.h(39) : see reference to class template instantiation 'MDITabChildWindowImpl<T,C>' being compiled
        with
        [
            T=DirectoryListingFrame,
            C=16711935
I am using VS .NET 2003

ivulfusbar
Posts: 506
Joined: 2003-01-03 07:33

Post by ivulfusbar » 2004-12-16 01:54

read compile.txt once more.
Everyone is supposed to download from the hubs, - I don´t know why, but I never do anymore.

d0t
Posts: 4
Joined: 2004-12-16 01:42

Post by d0t » 2004-12-16 01:58

If youre talking about WTL i got the latest version from sf.net/projects/wtl and put it into the wtl folder and my includes.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-12-16 11:55

atlframe.h from WTL isn't being used, per your error message, it's using the WTL 3.1 version that comes with Visual C++ .NET 2003. Check that you put the include\ files from the wtl source in the right place - perhaps you just extracted the whole thing without noticing that there were subdirectories?

d0t
Posts: 4
Joined: 2004-12-16 01:42

Post by d0t » 2004-12-16 17:41

Nope... its 7.5. I replaced all my atlframe.h because when I double clicked on the error to go the line, and scrolled up:

// Windows Template Library - WTL version 7.5
// Copyright (C) Microsoft Corporation. All rights reserved.
//
// This file is a part of the Windows Template Library.
// The use and distribution terms for this software are covered by the
// Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
// which can be found in the file CPL.TXT at the root of this distribution.
// By using this software in any fashion, you are agreeing to be bound by
// the terms of this license. You must not remove this notice, or
// any other, from this software.

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2004-12-16 19:00

Replaced? You need the separate WTL installed in a separate dir from VS.NET's
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

d0t
Posts: 4
Joined: 2004-12-16 01:42

Post by d0t » 2004-12-16 19:14

OK I restored the .NET headers, and added the WTL header folder to top of include directories. Same thing.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-12-17 14:00

d0t wrote:OK I restored the .NET headers, and added the WTL header folder to top of include directories.
If you got the same error, WTL 7.5 is not being referenced before the built in WTL 3.1, which points to an include error.

ivulfusbar
Posts: 506
Joined: 2003-01-03 07:33

Post by ivulfusbar » 2004-12-18 02:12

as i have already said before in this thread.. read compile.txt again. The order of the different paths in the compile-path is of importance.
Everyone is supposed to download from the hubs, - I don´t know why, but I never do anymore.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2004-12-18 05:02

There should be no need to setup include path with the latest versions, instead just put a folder called wtl in the source dir containing the contents of the include dir (not the dir itself just the content) in the wtl package.

mstac11
Posts: 5
Joined: 2004-12-20 09:54

Post by mstac11 » 2004-12-20 10:14

I just recently downloaded the source and DID in fact need to add the path to the include directory in the wtl project files to the list of include directories.

For those new to the process, if you're using VS.Net 2003 go to:

Tools > Options > Projects > VC++ Directories

And add the path to the wtl\include directory (e.g. "c:\DC++\wtl\include").


As an aside: I understand that the "regulars" on here probably get bombarded with "idiot" questions all the time. Still, no reason for pithy "holier-than-thou" responses. The compile.txt file DID NOT contain any instructions to add to the include directory list. Perhaps thats elementary to veteran DC++ people, but for initiates it might be less obvious... especially when its NOT in the directions you keep on referencing. Arent collaberative projects supposed to be INCLUSIVE rather than EXCLUSIVE? Just a thought.

Anyway, can't wait to dig into this thing!

Cheers,

Marc

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2004-12-20 10:29

No one wants to be rude but have you done a search for this in here?. There is ALOT of posts about this 'problem'.

Anyway, it's nice that you dig into the code and create and understanding of it.

But........a tip: It's the searching and investigation that will actually teach you how things work. Try, try, try until you're fed up - then come back and ask :)
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2004-12-20 11:53

No, you shouldn't have to add the folders to your include path. I'm running vs .net 2003 here and I haven't doen it. Just create one folder called stlport and one folder called wtl in the same directory as the dcplusplus source and then unzip the contents of stlport to the stlport folder and to the wtl folder extract the contents of the include foler in the wtl packages so that he wtl folder only contains .h files. This setup works like a charm for me.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-12-20 12:14

mstac11 wrote:As an aside: I understand that the "regulars" on here probably get bombarded with "idiot" questions all the time. Still, no reason for pithy "holier-than-thou" responses. Arent collaberative projects supposed to be INCLUSIVE rather than EXCLUSIVE? Just a thought.
If you'd like to contribute by helping people here, because you can provide a higher quality of support than others, we'd love to have you.

mstac11
Posts: 5
Joined: 2004-12-20 09:54

Post by mstac11 » 2004-12-20 12:14

Well, at least you used the word "shouldn't" instead of flat out telling me i "didn't" have to add to the include paths.

I assure you i followed the compile instructions to the letter... downloaded and created directories like i was told. When i tried to compile, i got the error that a lot of folks are writing about on here... I.e.

Compiling...
stdafx.cpp
c:\DC++\windows\stdafx.h(46) : fatal error C1083: Cannot open include file: 'atlapp.h': No such file or directory

Once i added the include directories, the error went away.

So... not sure what is different about our configurations. Perhaps, as you suggest, you are charmed. :)

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2004-12-20 12:23

When reading the compile.txt now I see one thing that really might be an error, it tells you to extract everything in the wtl pckage to the wtl folder but this is not correct. The only files that should go into the wtl folder is the include files. The files that should be in the wtl folder is the following:

Code: Select all

atlapp.h
atlcrack.h
atlctrls.h
atlctrlw.h
atlctrlx.h
atlddx.h
atldlgs.h
atlframe.h
atlgdi.h
atlmisc.h
atlprint.h
atlres.h
atlresce.h
atlscrl.h
atlsplit.h
atltheme.h
atluser.h
atlwinx.h

mstac11
Posts: 5
Joined: 2004-12-20 09:54

Post by mstac11 » 2004-12-20 12:33

joakim: good catch! :) If thats the case, that'll save some of the "this wont compile" posts.

Gargoyle: I'm sure its annoying to hear the same questions over and over. I never said anything about the quality of, nor anything about my ability to provide help. I was only commenting on the general "tone". If my feedback offended you, i apologize. I was in no way attempting to impugn your expertise or role as a DC++ guru.

Peace.

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2004-12-20 12:52

Obviously this is due to a "new" Project setting in "C/C++" -> General, which has "$(SolutionDir)\stlport";"$(SolutionDir)\wtl" in it. I use the old way. The good thing is that you're free to choose :)
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-12-22 12:31

mstac11 wrote:If my feedback offended you, i apologize. I was in no way attempting to impugn your expertise or role as a DC++ guru.
I'm not a guru, I'm just a guy who likes to help other people. And your complaint is valid, though hopefully the tone is good in most of the posts.


So, if the instructions are unclear, either compile.txt needs to talk about the contents of the include\ directory (or perhaps "header files"). Doing that is better than patching the .vcproj files to reference ".\wtl\include" - since undoubtely some people have it working fine that way.

mstac11
Posts: 5
Joined: 2004-12-20 09:54

Post by mstac11 » 2004-12-23 09:44

So, if the instructions are unclear, either compile.txt needs to talk about the contents of the include\ directory (or perhaps "header files"). Doing that is better than patching the .vcproj files to reference ".\wtl\include" - since undoubtely some people have it working fine that way.
Agreed. At least mentioning the include path issue would save you a bunch of "can't compile" posts here. At least... one would hope.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-12-27 15:19

mstac11 wrote:Agreed. At least mentioning the include path issue would save you a bunch of "can't compile" posts here. At least... one would hope.
Would this have helped you?

Code: Select all

1) Dowload the source and STLPort from the download site. Download WTL from http://sf.net/projects/wtl.  
   Unpack the source, then create two more directories under there, "stlport" and "wtl". Unpack stlport 
   into the stlport directory, and extract the contents of the wtl's include directory into wtl\.  If 
   you're brave, you can try compiling without STLPort, see config.h (I don't maintain it though)

mstac11
Posts: 5
Joined: 2004-12-20 09:54

Post by mstac11 » 2004-12-28 11:19

Yes, most definitely. The problem was that the instructions didnt work as expressly written... and folks on here kept telling people with compile problems to go reread the instructions. Catch-22. That tweak should fix the inconsistency.

Thanks.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-12-29 12:30

mstac11 wrote:That tweak should fix the inconsistency.
It's in the CVS repository now, so hopefully there'll be less confusion in the future.

Or, hopefully, confusion about a different subject, since this is spelled out better.

Locked