You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
Try to rebuild the simple test code (see below):
///////////////////////////////////main.cpp
#include <stdafx.h>
#include <rdestl/hash_map.h>
int main(int argc, char** argv)
{
rde::hash_map<const char *, int, rde::hash<const char *>, 6> hashmap;
hashmap["abc"] = 1;
hashmap["def"] = 2;
rde::hash_map<const char *, int, rde::hash<const char *>, 6>::iterator it
= hashmap.find("abc");
if(it != hashmap.end())
std::cout << it->second;
return 0;
}
///////////////stdafx.h
#ifndef _STDAFX_H_
#define _STDAFX_H_
#pragma once
#include <iostream>
#endif
What is the expected output? What do you see
Compilation without errors is expected instead I get an errors:
Error 1 error LNK2019: unresolved external symbol "public: void __thiscall
rde::allocator::deallocate(void *,unsigned int)"
(?deallocate@allocator@rde@@QAEXPAXI@Z) referenced in function "private:
void __thiscall rde::hash_map<char const *,int,struct rde::hash<char const
*>,6,struct rde::equal_to<char const *>,class
rde::allocator>::delete_nodes(void)"
(?delete_nodes@?$hash_map@PBDHU?$hash@PBD@rde@@$05U?$equal_to@PBD@2@Vallocator@2
@@rde@@AAEXXZ)
main.obj rdestltest
Error 2 error LNK2019: unresolved external symbol "public: void *
__thiscall rde::allocator::allocate(unsigned int,int)"
(?allocate@allocator@rde@@QAEPAXIH@Z) referenced in function "private:
struct rde::hash_map<char const *,int,struct rde::hash<char const
*>,6,struct rde::equal_to<char const *>,class rde::allocator>::node *
__thiscall rde::hash_map<char const *,int,struct rde::hash<char const
*>,6,struct rde::equal_to<char const *>,class
rde::allocator>::allocate_nodes(int)"
(?allocate_nodes@?$hash_map@PBDHU?$hash@PBD@rde@@$05U?$equal_to@PBD@2@Vallocator
@2@@rde@@AAEPAUnode@12@H@Z)
main.obj rdestltest
Error 3 fatal error LNK1120: 2 unresolved externals
C:\Projects\RoughSetLib\Debug\rdestltest.exe rdestltest
What version of the product are you using? On what operating system?
Windows 7 Enterprise 64 bit
Microsoft Visual Studio Team System 2008 (development Edition) with SP1
installed
Please provide any additional information below.
I guess that it might be related to linker setup?
What is needed to compile this on MSVS 2008SP1 ?
Original issue reported on code.google.com by sebastia...@gmail.com on 8 Mar 2010 at 9:57
The text was updated successfully, but these errors were encountered:
Thank you for your answer.
I've deleted my last comment as it had nothing to do with this issue (also when
posting it I did not see your answer - possibly we were posting it in the same
time).
Linking with rdestl.lib did not change anything, RDESTL code was a separate
project
in my MSVS solution and my project had a reference to it. Your suggestion make
me
play with the configuration and what I've noticed is that I was using x64
configuration all the time. When switch to Win32 everything starts to work
fine.
Is it possible to compile RDESTL as 64 bit version (considering only the use of
hash_map)? I have noticed that in several files there is a note that "won't
work on
64bit eg. vector.h)
Best Regards,
Sebastian
Original comment by sebastia...@gmail.com on 15 Mar 2010 at 7:22
Original issue reported on code.google.com by
sebastia...@gmail.com
on 8 Mar 2010 at 9:57The text was updated successfully, but these errors were encountered: