PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : fatal error C1010



AUTHacker
07-04-2003, 15:02
hallo,
ich hab ein C++ projekt unter linux gemacht.
mein problem ist nun, dass der source auch auf einer win-plattform compilierbar sein muss. so weit so gut - ich hab mich bemüht alles in ANSI-C zu schreiben.
unter linux funkt die software einwandfrei. nun wollte ich die .c, .c++, .h files zu einem projekt in MS VC++ 6.0 einbinden. um eine win-gui dazu zu erstellen. hab die files alle zum projekt dazugehängt. beim compilieren erhalte ich nun 4x den folgenden fehler:

"fatal error C1010: unexpected end of file while looking for precompiled header directive"

der fehler tritt in einem .c und in drei .cpp files auf.

p.s.: hab bis jetzt meistens mit gcc + vi gearbeitet, bin noch relativ unerfahren mit VC++ 6.0

AUTHacker
07-04-2003, 15:16
ich hab das hier http://www.codeguru.com/mfc/comments/38065.shtml
ausprobiert, aber dann wurden die errors nur noch mehr - kann auch sein dass ich's nicht richtig gemacht hab

any ideas ?

anda_skoa
07-04-2003, 18:15
hat das nicht funktioniert?



If your module is "pure" C++ code (for example, your own "Date" class), with no need to reference MFC at all, then you may prefer not to add the "stdafx.h" include directive. In this case, you can change the project settings to inform MSVC that you are not making use of the precompiled header files. Here's how to do it:

From the Project menu, select Settings ....
Make sure the Settings for selection reflects the project you are building. By default, this will likely be "Win32 Debug".

Expand the Source Files folder in the list on the left, and click once on the source file that you don't want to use precompiled headers.

On the right, select the C/C++ tab.
In the Category combo box, select Precompiled headers.
Select the Not using precompiled headers option.

Repeat for any other files for which you wish to disable precompiled headers (but not for any files created by the Developer Studio AppWizard).
Click OK to close the project settings dialog.


Ciao,
_

AUTHacker
08-04-2003, 08:55
nein, hat leider nicht funktioniert.
vielleicht find ich heute mehr raus...

tkortkamp
08-04-2003, 11:25
Hi!

Probier mal Alt-F7 zu drückern und unter den C++ optionen, "Precompiled headers"
abzuschalten. Quelle: http://www.gametutorials.com/forum/topic.asp?TOPIC_ID=4775

c ya,
Tobias

AUTHacker
08-04-2003, 11:53
danke !

ich hab die option ausgeschaltet und siehe da:
es hat funktioniert.

danke für eure schnellen & kompetenten antworten !!!