garryMarshall
January 21st, 2005, 03:30 PM
My code under VS7.0 works under debug mode. But when I change it to Release mode two out of four methods in my class can not link. I have included part of that code.
------ Build started: Project: ManBase, Configuration: Release Win32 ------
Deleting intermediate files and output files for project 'ManBase', configuration 'Release|Win32'.
Compiling...
UnmanagedBase.cpp
ManBase.cpp
AssemblyInfo.cpp
Generating Code...
Compiling resources...
Linking...
ManBase.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall UnmanagedRtc::GetMaxEncryptedSize(unsigned int)" (?GetMaxEncryptedSize@UnmanagedRtc@@$$FQAEII@Z)
ManBase.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall UnmanagedRtc::GetDecryptedSize(unsigned char const *,unsigned int,unsigned int *)" (?GetDecryptedSize@UnmanagedRtc@@$$FQAEIPBEIPAI@Z)
./win32_release\Base.dll : fatal error LNK1120: 2 unresolved externals
ManBase - 3 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped
// this is the .h file
#pragma once
#include <stdint.h>
__nogc class UnmanagedRtc
{
public:
UnmanagedRtc();
~UnmanagedRtc();
int Decrypt(const uint8_t *inbuf, size_t uInSize, uint16_t *outbuf, size_t *puOutSize);
int Encrypt( const uint16_t *source, size_t uInSize, uint8_t *dest, size_t *outSize );
size_t GetDecryptedSize(const uint8_t *inbuf, size_t uInSize, size_t *puOutSize);
size_t GetMaxEncryptedSize( size_t size);
private:
};
// this is the .cpp file without the constructor
int UnmanagedRtc::Decrypt(const uint8_t *inbuf, size_t uInSize, uint16_t *outbuf, size_t *puOutSize)
{
return Rtc::DecryptW(inbuf, uInSize, outbuf, puOutSize);
}
int UnmanagedRtc::Encrypt( const uint16_t *source, size_t uInSize, uint8_t *dest, size_t *outSize )
{
return Rtc::EncryptW(source, uInSize, dest, outSize);
}
size_t UnmanagedRtc::GetDecryptedSize(const uint8_t *inbuf, size_t uInSize, size_t *puOutSize)
{
return Rtc::GetDecryptedSize(inbuf, uInSize, puOutSize);
}
size_t UnmanagedRtc::GetMaxEncryptedSize( size_t size)
{
return Rtc::GetMaxEncryptedSizeW(size);
}
Any help would be appreciated.
Thanks, Garry
------ Build started: Project: ManBase, Configuration: Release Win32 ------
Deleting intermediate files and output files for project 'ManBase', configuration 'Release|Win32'.
Compiling...
UnmanagedBase.cpp
ManBase.cpp
AssemblyInfo.cpp
Generating Code...
Compiling resources...
Linking...
ManBase.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall UnmanagedRtc::GetMaxEncryptedSize(unsigned int)" (?GetMaxEncryptedSize@UnmanagedRtc@@$$FQAEII@Z)
ManBase.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall UnmanagedRtc::GetDecryptedSize(unsigned char const *,unsigned int,unsigned int *)" (?GetDecryptedSize@UnmanagedRtc@@$$FQAEIPBEIPAI@Z)
./win32_release\Base.dll : fatal error LNK1120: 2 unresolved externals
ManBase - 3 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped
// this is the .h file
#pragma once
#include <stdint.h>
__nogc class UnmanagedRtc
{
public:
UnmanagedRtc();
~UnmanagedRtc();
int Decrypt(const uint8_t *inbuf, size_t uInSize, uint16_t *outbuf, size_t *puOutSize);
int Encrypt( const uint16_t *source, size_t uInSize, uint8_t *dest, size_t *outSize );
size_t GetDecryptedSize(const uint8_t *inbuf, size_t uInSize, size_t *puOutSize);
size_t GetMaxEncryptedSize( size_t size);
private:
};
// this is the .cpp file without the constructor
int UnmanagedRtc::Decrypt(const uint8_t *inbuf, size_t uInSize, uint16_t *outbuf, size_t *puOutSize)
{
return Rtc::DecryptW(inbuf, uInSize, outbuf, puOutSize);
}
int UnmanagedRtc::Encrypt( const uint16_t *source, size_t uInSize, uint8_t *dest, size_t *outSize )
{
return Rtc::EncryptW(source, uInSize, dest, outSize);
}
size_t UnmanagedRtc::GetDecryptedSize(const uint8_t *inbuf, size_t uInSize, size_t *puOutSize)
{
return Rtc::GetDecryptedSize(inbuf, uInSize, puOutSize);
}
size_t UnmanagedRtc::GetMaxEncryptedSize( size_t size)
{
return Rtc::GetMaxEncryptedSizeW(size);
}
Any help would be appreciated.
Thanks, Garry