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

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


Compile Error, MFC 2.52

Todd Foster -- foster@media.philips.com
Tuesday, January 02, 1996

Hello out there and a Happy New Year to all.

Now, I've switched to release mode in my Win3.x app, using
MFC 2.52.  All of a sudden, I've stumbled into weird compile error land...

c:\app\dibs\dibsdoc.cpp(700) : fatal error C1035: expression too complex, please simplify

This is occurring upon data construction of a class using 12 parameters.
It's just a means to create quick test data ie...

	CSearchText srchText("Brand", "Category", 
		"UPC Code","Product size","Model Number",
		"Description","Items Per Product","Name", 
		"Manufacturer","DIBs ID","Size","Shot Type");
defined as ...
    CSearchText( CString key1, CString key2, CString key3, CString key4,
    			CString key5, CString key6, CString key7, CString key8,
    			CString key9, CString key10, CString key11, CString key12);

per the KBase article Q100966, I eliminate the error by turning off Optimizations.

Does anyone know a specific resolution to this problem or a particular optimization
to remove beyond turning off all optimizations?

Thanx in advance for any feedback.

---------------------------------------------
 Todd Foster 
 01/02/96 - 15:22:37
---------------------------------------------





David Stidolph -- stidolph@magnet.com
Wednesday, January 03, 1996


Try switching the parameters to reference (CString &name) or as
pointers (LPCSTR name) - the problem will probably go away.

Usually with more than 4 parameters it is best to use a structure of
some point[ers] and pass that - quick, what is parameter six?

----------
From: 	Todd Foster[SMTP:foster@media.philips.com]
Sent: 	Tuesday, January 02, 1996 6:22 PM
To: 	mfc-l@netcom.com
Subject: 	Compile Error, MFC 2.52

Hello out there and a Happy New Year to all.

Now, I've switched to release mode in my Win3.x app, using
MFC 2.52.  All of a sudden, I've stumbled into weird compile error land...

c:\app\dibs\dibsdoc.cpp(700) : fatal error C1035: expression too complex, please simplify

This is occurring upon data construction of a class using 12 parameters.
It's just a means to create quick test data ie...

	CSearchText srchText("Brand", "Category", 
		"UPC Code","Product size","Model Number",
		"Description","Items Per Product","Name", 
		"Manufacturer","DIBs ID","Size","Shot Type");
defined as ...
    CSearchText( CString key1, CString key2, CString key3, CString key4,
    			CString key5, CString key6, CString key7, CString key8,
    			CString key9, CString key10, CString key11, CString key12);

per the KBase article Q100966, I eliminate the error by turning off Optimizations.

Does anyone know a specific resolution to this problem or a particular optimization
to remove beyond turning off all optimizations?

Thanx in advance for any feedback.

---------------------------------------------
 Todd Foster 
 01/02/96 - 15:22:37
---------------------------------------------




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