thegrinch
December 20th, 2005, 10:27 AM
Hi all!
I'm new to VC++.net. I want to use ansi c code with vc++.net. Now I created a Windows-Forms Application-Project (.NET). What I have to do is:
I have this struct:
struct scaled_image_set
{
long sx; /*Size in x-Direction*/
long sy; /*Size in y-Direction*/
float hx; /*horizontal Pixel-Size*/
float hy; /*vertival Pixel-Size*/
cimage f1; /*Image one*/
cimage f2; /*Image two*/
cimage fx; /*Image Derivative in x-Dir*/
cimage fy; /*Image Derivative in y-Dir*/
cimage fz; /*Image Derivative in z-Dir*/
float **u;
float **v;
float **utot;
float **vtot;
};
typedef struct scaled_image_set sis;
OK. To allocate storage, I wrote this Method:
void alloc_set(sis *set, long _sx, long _sy);
Ok.
now, in Form1.h I declared
private: sis * set
Up to this, all compiles and links fine.
but if I try to call
alloc_set(set, 10,10);
linking fails with message
"test fatal error LNK1284: metadata inconsistent with COFF symbol table: symbol '?alloc_set@@$$FYAXPAUscaled_image_set@@JJ@Z' (0A000045) mapped to '?alloc_set@@$$J0YAXPAUscaled_image_set@@JJ@Z' (06000001) in multiscale.obj"
Whats this? What am I doing wrong?
I dont need to have this code managed, I just wand to use it.
Best thanks for your help in advance!
kind regards
Oliver Demetz
I'm new to VC++.net. I want to use ansi c code with vc++.net. Now I created a Windows-Forms Application-Project (.NET). What I have to do is:
I have this struct:
struct scaled_image_set
{
long sx; /*Size in x-Direction*/
long sy; /*Size in y-Direction*/
float hx; /*horizontal Pixel-Size*/
float hy; /*vertival Pixel-Size*/
cimage f1; /*Image one*/
cimage f2; /*Image two*/
cimage fx; /*Image Derivative in x-Dir*/
cimage fy; /*Image Derivative in y-Dir*/
cimage fz; /*Image Derivative in z-Dir*/
float **u;
float **v;
float **utot;
float **vtot;
};
typedef struct scaled_image_set sis;
OK. To allocate storage, I wrote this Method:
void alloc_set(sis *set, long _sx, long _sy);
Ok.
now, in Form1.h I declared
private: sis * set
Up to this, all compiles and links fine.
but if I try to call
alloc_set(set, 10,10);
linking fails with message
"test fatal error LNK1284: metadata inconsistent with COFF symbol table: symbol '?alloc_set@@$$FYAXPAUscaled_image_set@@JJ@Z' (0A000045) mapped to '?alloc_set@@$$J0YAXPAUscaled_image_set@@JJ@Z' (06000001) in multiscale.obj"
Whats this? What am I doing wrong?
I dont need to have this code managed, I just wand to use it.
Best thanks for your help in advance!
kind regards
Oliver Demetz