DSPRelated.com
Forums

how to see the output?

Started by c_19...@hotmail.com January 8, 2008
i have a problem, i can't see the output...
this is my program :

#include
#include
#define pi 4.0*atan(1.0)
#define BUFSIZE 300

int out_buffer[BUFSIZE];
void main()
{
int *output = &out_buffer[0];
int bits,samples_bit,a[6];
float bpsk;
FILE *fp;
fp=fopen("c:\\bpsk.dat","w");
a[0]=1,a[1]=-1;a[2]=-1;
a[3]=1,a[4]=-1;a[5]=1;
fprintf(fp,"1651 4 0 0 0\n");/*Header format of the data
file to be specified based on the data type where first
four digits are fixed so called Magic Number, since 4 is
mentioned as the samples are of floating point type*/
for(bits=0;bits<6;bits++)
for(samples_bit=0;samples_bit<50;samples_bit++)
{
if(a[bits] == 1)
bpsk0*sin(2*pi*samples_bit/25);
if(a[bits] == -1)
bpsk=-100*sin(2*pi*samples_bit/25);
fprintf(fp,"%f\n",bpsk);
printf("%f\n",bpsk);
*output++=bpsk; /*Output data writing to a buffer*/
}
fclose(fp);
}
how i can see the output?and i have an error, this is the error when i try to build this program :

------------------------------ bpsk.pjt - Debug ------------------------------
[Linking...] "C:\CCStudio_v3.1\C5400\cgtools\bin\cl500" -@"Debug.lkf"

>> warning: entry point symbol _c_int00 undefined

undefined first referenced
symbol in file
--------- ----------------
_fopen C:\CCStudio_v3.1\tutorial\sim54xx\bpsk\Debug\bpsk.obj
_printf C:\CCStudio_v3.1\tutorial\sim54xx\bpsk\Debug\bpsk.obj
F$$FTOI C:\CCStudio_v3.1\tutorial\sim54xx\bpsk\Debug\bpsk.obj
F$$ITOF C:\CCStudio_v3.1\tutorial\sim54xx\bpsk\Debug\bpsk.obj
F$$DIV C:\CCStudio_v3.1\tutorial\sim54xx\bpsk\Debug\bpsk.obj
_sin C:\CCStudio_v3.1\tutorial\sim54xx\bpsk\Debug\bpsk.obj
F$$MUL C:\CCStudio_v3.1\tutorial\sim54xx\bpsk\Debug\bpsk.obj
_fclose C:\CCStudio_v3.1\tutorial\sim54xx\bpsk\Debug\bpsk.obj
_atan C:\CCStudio_v3.1\tutorial\sim54xx\bpsk\Debug\bpsk.obj
_fprintf C:\CCStudio_v3.1\tutorial\sim54xx\bpsk\Debug\bpsk.obj
>> error: symbol referencing errors - './Debug/bpsk.out' not built

>> Compilation failure

Build Complete,
2 Errors, 1 Warnings, 0 Remarks.
thanks in advance...
cheers,
christian