views:

175

answers:

1

I have made a dll that compiles fine in 32bit mode, but when compiling in 64bit mode (both on a 32bit box cross compiling and on a native 64bit box) I get the above error. The symbol that it is complaining about are the following:

"struct return_info_ * __cdecl patch_file(char *,char *,char *)"

I am new to C++ but I think I have defined both the struct and the signature correctly. The struct "return_info_" is defined as follows:

typedef struct return_info_
{
    char *message;
    int code;
} return_info;

In the same header I have the signature of the function:

return_info* patch_file(char* oldfile, char* newfile, char* patchfile);

This is all in native c/c++ code, which is compiled as a statically linked library. I then have our main library which links to this and is a clr compatible binary. Any ideas why the 64bit compiler throws these errors?

+1  A: 

The declaration in the header looks correct, but for some reason, in your 64bit build, the actual implementation not being found.

Is this defined in your library? It may not have been compiled correctly in its 64bit version.

If this is a function that's part of your application, make sure the correct source file is being included as part of the 64bit build process, as well.

Reed Copsey
I hadn't noticed that the 64bit build had gone to a different directory, when I was fiddling with the various build and linker options I must have changed it. Cleared everything down, ensured that all was pointing the right place and it now compiles correctly. Thanks!
ICompton