Importing c code into vc++ 
Author Message
 Importing c code into vc++

Hi!

I have some old c code that I want to run inside a Visual C++
environment. Does anybody have good "recipe" for how I can do this?

I have tried to ad the c-files into a MFC application, but something is
missing..??

While compiling I get: "unexpected end of file when looking for
precompiler directive"

terjem



Sun, 27 Mar 2005 02:03:37 GMT  
 Importing c code into vc++
In the Project Settings for your project select C/C++ tab, select
Precompiled Headers category, check Automatic use of prceompiled heders.
That should fix it.


Quote:
> Hi!

> I have some old c code that I want to run inside a visual c++
> environment. Does anybody have good "recipe" for how I can do this?

> I have tried to ad the c-files into a MFC application, but something is
> missing..??

> While compiling I get: "unexpected end of file when looking for
> precompiler directive"

> terjem



Sun, 27 Mar 2005 02:46:21 GMT  
 Importing c code into vc++


|Hi!
|
|I have some old c code that I want to run inside a visual c++
|environment. Does anybody have good "recipe" for how I can do this?
|
|I have tried to ad the c-files into a MFC application, but something is
|missing..??
|
|While compiling I get: "unexpected end of file when looking for
|precompiler directive"
|
|terjem

you need the

#include "stdafx.h"

at top of the file.



Sun, 27 Mar 2005 02:55:20 GMT  
 Importing c code into vc++


Quote:
> Hi!

> I have some old c code that I want to run inside a visual c++
> environment. Does anybody have good "recipe" for how I can do this?

> I have tried to ad the c-files into a MFC application, but something
is
> missing..??

That's exactly what you need to do.

Quote:
> While compiling I get: "unexpected end of file when looking for
> precompiler directive"

This is not an issue with adding a C file to a project,
but rather adding any file to a project.

Search the help for this error message. You have
the default project setting "use precompiled headers
through stdafx..." etc. set, but the file doesn't #include
"stdafx.h".

Either turn off precompiled headers for that file, or
add the #include directive at the top.

See the help for more details.



Sun, 27 Mar 2005 03:12:33 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Importing c code into vc++ and mfc

2. HELP : Cannot create CPropertySheet in VC 6 with old code (VC 5 code)

3. does vc++ .net produce vc++ 6 code?

4. Graphics Rendering project source code c/vc/vc++

5. VB type libraray import problem in VC...

6. Help on Accessing ADO Objects Using VC via import

7. #import problem in VC++.NET (tlb is created after the DLL)

8. ADO Multithreading question with the VC import command

9. Use Alt In Vc Platform about #import msado15.dll

10. Import library for VC

11. #import causes VC 2003 to hang

12. Import VB6 vbp into VC 6

 

 
Powered by phpBB® Forum Software