15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Visual C++ 4.2 version problem

Elie E.E. Bensaci 8M45 BNR -- elie.bensaci.cnt75196@bnr.ca
Thursday, October 31, 1996

Environment: VC++ 4.2b, Windows 95

I just upgraded my system from Visual C++ 4.1 to Visual C++ 4.2 enterprise edition. My problem is 
my Current project which was created and built using Visual C++ 4.1 is now not compiling under 
Visual C++ 4.2

I'm using the following code:

CTLEXT_INLINE CTreeCtrlEx::CTreeCtrlEx() : CTreeCtrl()
CTLEXT_INLINE CListCtrlEx::CListCtrlEx() : CListCtrl()

in a file called ctrlext.inl which I took from one of the MFC samples, It was compiling properly 
under VC++ 4.1 but not now with the VC++ 4.2

When I tried to compile ctrlext.inl by itself, it won't and prompts " no compile tool is associated 
the the file extension"

Any ideas ?
Thanks,
Elie.
============================
Elie Bensaci
Nortel
20 Fitzgerald Rd.
Mail stop: 004
Nepean, Ontario, K2H 8R6
Canada
Phone: (613) 765-5576
Fax :  (613) 763-7232
===========================



David Little -- dlittle@equinoxcorp.com
Saturday, November 02, 1996

[Mini-digest: 4 responses]

My idea is to check for duplicate include files...some left over from 4.1 might be in different directories....

----------
From: 	( Elie E.E. Bensaci 8M45 BNR )[SMTP:elie.bensaci.cnt75196@bnr.ca]
Sent: 	Thursday, October 31, 1996 11:54 AM
To: 	mfc-l@netcom.com
Subject: 	Visual C++ 4.2 version problem

Environment: VC++ 4.2b, Windows 95

I just upgraded my system from Visual C++ 4.1 to Visual C++ 4.2 enterprise edition. My problem is 
my Current project which was created and built using Visual C++ 4.1 is now not compiling under 
Visual C++ 4.2

I'm using the following code:

CTLEXT_INLINE CTreeCtrlEx::CTreeCtrlEx() : CTreeCtrl()
CTLEXT_INLINE CListCtrlEx::CListCtrlEx() : CListCtrl()

in a file called ctrlext.inl which I took from one of the MFC samples, It was compiling properly 
under VC++ 4.1 but not now with the VC++ 4.2

When I tried to compile ctrlext.inl by itself, it won't and prompts " no compile tool is associated 
the the file extension"

Any ideas ?
Thanks,
Elie.
============================
Elie Bensaci
Nortel
20 Fitzgerald Rd.
Mail stop: 004
Nepean, Ontario, K2H 8R6
Canada
Phone: (613) 765-5576
Fax :  (613) 763-7232
===========================


-----From: "Shrikanth Swaminathan" 

Couple of things u could try ....
- Do an update all dependencies, and then do a rebuild all. (del all pch,
temp files etc).
- If I remember right VC4.2 rel notes did mention some things about the
installation being diff.
Did you install it over the same directory. Worst comes to worst, you could
reinstall VC4.2,
after deleting the complete installation.

hope that helps.

-------------------------------------------------------------------
S.Shrikanth  sshri@csi-gmbh.de
Ph (o) +49-231-55707214 (h) +49-231-7270030
-------------------------------------------------------------------
We are what we repeatedly do,
Excellence, then is not an act, but a habit
Aristotle
-------------------------------------------------------------------

-----From: Jim Leavitt 

1)  I've used theses files successfully in 4.2 I think they're from the daoView example on the 
cd.  The files have changed a little from 4.1 to 4.2 - make sure you're using the up to date
  files.

2)  Just to be sure you're set up correctly, build the new daoView sample from your 4.2
 cd rom. If the sample refuses to build you've got some other problems.

These are nice class extensions and they do complile and work in 4.2b Thought you like
to know.

Jim Leavitt

-----From: Mike Blaszczak 

At 12:54 10/31/96 EST, ( Elie E.E. Bensaci 8M45 BNR )
 wrote:

>Environment: VC++ 4.2b, Windows 95

>I just upgraded my system from Visual C++ 4.1 to Visual C++ 4.2 enterprise
>edition. My problem is my Current project which was created and built
>using Visual C++ 4.1 is now not compiling under Visual C++ 4.2

What error messages do you get when your project fails to compile?

>I'm using the following code:

>CTLEXT_INLINE CTreeCtrlEx::CTreeCtrlEx() : CTreeCtrl()
>CTLEXT_INLINE CListCtrlEx::CListCtrlEx() : CListCtrl()

Do you really have literally this code?  It's wrong: you need to have
a body for the constructors, even if you're calling the base
class constructor in the initialization list.  So, you'd need to code:

CTLEXT_INLINE CTreeCtrlEx::CTreeCtrlEx() : CTreeCtrl()
{
}

CTLEXT_INLINE CListCtrlEx::CListCtrlEx() : CListCtrl()
{
}
>in a file called ctrlext.inl which I took from one of the MFC samples, It
>was compiling properly under VC++ 4.1 but not now with the VC++ 4.2

I looked, and the sample code that ships with the product _does_ have the
brackets.  It sounds like you took this code from the sample and modified
it and forgot to tell us that.  Did you modify anything else as you moved
the code around?

If you're going to write your code this way, you'll need to #define
CTLEXT_INLINE.  Did you do that?  What did you #define it to expand to?

I can find the macro CTLEXT_INLINE only in the DAOCTL and DAOVIEW samples.  I
can compile these samples without any problem at all using Visual C++ 4.2 with
the 4.2b patch installed.

>When I tried to compile ctrlext.inl by itself, it won't and prompts " no
>compile tool is associated the the file extension"

You can't compile .INL files.  Since they traditionally hold inline
function definitions which are referenced by other modules, they probably
_can't_ compile by themselves because they don't include any necessary
headers.

The IDE emits that message because it doesn't know what to do with
a *.INL file. It _would_ know what to do with a *.C or a *.CPP file, for 
example.  But the error means that you're not even starting the C++ compiler,
so that error message isn't a clue in your problem of getting your old
project to compile now that you've upgraded to Visual C++ 4.2.

You didn't explain to the list what error you got when your whole project
failed to build, and that scenario presumably actually tried to compile
one of your source code files that referenced your *.INL file.  You also
didn't explain why you thought those two lines of code were the problem.
What led you to that conclusion?

.B ekiM
http://www.nwlink.com/~mikeblas/
I'm afraid I've become some sort of speed freak.
These words are my own. I do not speak on behalf of Microsoft.





| Вернуться в корень Архива |