Hello,
Most probably many of you have read my previous post entitled "Malloc code".
You all have given very good feedback in that post. I am using in an embeded
compiler, and one of the feedbacks this news groups suggested was a hint (I
believe!) that said, since my embede compiler might slightly compile C code
diffrently, I should take this code and replicate it in MS VC++ .NET to see
if it compiles right before posting for help in this newsgroup thread. I am
using VC++ 2003 vresion. I agree with this because if it compiles in the VC++
compiler, it will be easier for this thread to debug.
Anyhow I used to code in VC++ (as a beginer!) but had to stop two years ago,
and today I tried to get some code from the embeded compiler and replicated
it in MSVC++ and I get an error. It has something to do with the fact that it
doesn't see the other files!
Here is the error:
c:\_DTS_PROGRAMMING\C_PROGRAMMING\c\CCS_TESTS\Test1\Test\Main.c(6): fatal
error C1083: Cannot open include file: 'LCD.h': No such file or directory
Here is the code:
(Please notice this is just test code to see if I can compile in VC++)
==============================================Main.c
#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <stdlib.h>
#include <malloc.h>
#include <LCD.h>
#include <TCP.h>
#include <LCD.c>
#include <TCP.c>
void TCP_CONFIG_GMM(struct MCB *MCBptrs[3])
{
struct MCB *y;
MCBptrs[0] = malloc(11*(sizeof(struct MCB)));
y = MCBptrs[1];
}
int main(void)
{
int a=1;
struct MCB *MCBptrs[3];
TCP_CONFIG_GMM(MCBptrs);
return 0;
}
==============================================
===========================================LCD.h
//No code for now
===============================================
===========================================LCD.c
//No code for now
===============================================
===========================================TCP.h
struct MCB{
int A0;
int A1;
int A2; };
===============================================
===========================================TCP.c
//No code for now
====================================================
I have looked in properties of VC++ but I don't know what setting I should
set to rectify this error. Can someone please help. Thanking all in advace!
--
Best regards
Robert