Click here to Skip to main content
15,902,114 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: win API autorun.. I can't use this codes... help me please.. Pin
mgbrain5-Feb-09 11:25
mgbrain5-Feb-09 11:25 
GeneralRe: win API autorun.. I can't use this codes... help me please.. Pin
Stuart Dootson5-Feb-09 11:32
professionalStuart Dootson5-Feb-09 11:32 
GeneralRe: win API autorun.. I can't use this codes... help me please.. Pin
mgbrain5-Feb-09 11:39
mgbrain5-Feb-09 11:39 
GeneralRe: win API autorun.. I can't use this codes... help me please.. Pin
David Crow5-Feb-09 15:32
David Crow5-Feb-09 15:32 
GeneralRe: win API autorun.. I can't use this codes... help me please.. Pin
Stuart Dootson5-Feb-09 19:53
professionalStuart Dootson5-Feb-09 19:53 
GeneralRe: win API autorun.. I can't use this codes... help me please.. Pin
David Crow5-Feb-09 15:31
David Crow5-Feb-09 15:31 
GeneralRe: win API autorun.. I can't use this codes... help me please.. Pin
mgbrain6-Feb-09 9:16
mgbrain6-Feb-09 9:16 
Questionunable to concatenate strings in c++ [RESOLVED] Pin
Gregory Lund5-Feb-09 5:42
Gregory Lund5-Feb-09 5:42 
Confused | :confused: Hi all,
I am working on a plugin that takes coordinates and sends them via socket to a receiving application. To do this, I need to package the coordinates. To make life on the receiving end easier, I want to package them as a string and send as a const char*. However, I cannot get the latitude string and the longitude string to concatenate, it just throws linker errors... any ideas what the problem is? Here is the code snippit in question:

std::stringstream sSLat;
std::stringstream sSLon;
std::string strLat;
std::string strLon;
std::string coordPack;

//package data to string
const char* sendCoords;
sSLat << lat ;
sSLon << lon;
strLat = sSLat.str();
strLon = sSLon.str();
coordPack = strLat + strLon; <---- this line seems to be causing the errors, when I comment out, it builds
sendCoords = coordPack.c_str();


Here are the errors I am getting:

1>------ Build started: Project: 2DMapPlugin, Configuration: Release Win32 ------
1>Linking...
1>2DMapPlugin.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: char * __thiscall stlp_std::basic_string<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> >::_M_append_fast_pos(struct stlp_std::priv::__bstr_wrapper<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> >,char *,unsigned int,unsigned int)" (__imp_?_M_append_fast_pos@?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@stlp_std@@AAEPADU?$__bstr_wrapper@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@priv@2@PADII@Z)

1>2DMapPlugin.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: char * __thiscall stlp_std::basic_string<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> >::_M_append_fast(struct stlp_std::priv::__bstr_wrapper<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> >,char *)" (__imp_?_M_append_fast@?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@stlp_std@@AAEPADU?$__bstr_wrapper@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@priv@2@PAD@Z)

1>2DMapPlugin.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: char * __thiscall stlp_std::basic_string<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> >::_M_append_fast_pos(struct stlp_std::priv::__sum_storage_elem<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> > const &,char *,unsigned int,unsigned int)" (__imp_?_M_append_fast_pos@?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@stlp_std@@AAEPADABU?$__sum_storage_elem@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@priv@2@PADII@Z)

1>2DMapPlugin.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: char * __thiscall stlp_std::basic_string<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> >::_M_append_fast(struct stlp_std::priv::__sum_storage_elem<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> > const &,char *)" (__imp_?_M_append_fast@?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@stlp_std@@AAEPADABU?$__sum_storage_elem@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@priv@2@PAD@Z)

1>2DMapPlugin.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: unsigned int __thiscall stlp_std::basic_string<char,class stlp_std::char_traits<char>,class stlp_std::allocator<char> >::_M_get_additional_size(unsigned int,struct stlp_std::__true_type const &)const " (__imp_?_M_get_additional_size@?$basic_string@DV?$char_traits@D@stlp_std@@V?$allocator@D@2@@stlp_std@@ABEIIABU__true_type@2@@Z)

1>C:\Documents and Settings\lundg\My Documents\Visual Studio 2005\Projects\2DMapPlugin\Release\2DMapPlugin.dll : fatal error LNK1120: 5 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\lundg\My Documents\Visual Studio 2005\Projects\2DMapPlugin\2DMapPlugin\Release\BuildLog.htm"
1>2DMapPlugin - 6 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Any help you can give will be appreciated!

Thanks!

modified on Thursday, February 5, 2009 1:27 PM

AnswerRe: unable to concatenate strings in c++ Pin
Code-o-mat5-Feb-09 5:53
Code-o-mat5-Feb-09 5:53 
AnswerRe: unable to concatenate strings in c++ Pin
Stuart Dootson5-Feb-09 6:20
professionalStuart Dootson5-Feb-09 6:20 
GeneralRe: unable to concatenate strings in c++ Pin
Gregory Lund5-Feb-09 7:27
Gregory Lund5-Feb-09 7:27 
QuestionHow to read the contents of a VARIANT ? Pin
LindeA5-Feb-09 3:39
LindeA5-Feb-09 3:39 
AnswerRe: How to read the contents of a VARIANT ? Pin
CPallini5-Feb-09 3:55
mveCPallini5-Feb-09 3:55 
GeneralRe: How to read the contents of a VARIANT ? Pin
LindeA5-Feb-09 21:19
LindeA5-Feb-09 21:19 
AnswerRe: How to read the contents of a VARIANT ? Pin
prasad_som5-Feb-09 4:20
prasad_som5-Feb-09 4:20 
Questionconnecting to mysql server in remote location .. Pin
Thilek5-Feb-09 2:34
Thilek5-Feb-09 2:34 
AnswerRe: connecting to mysql server in remote location .. Pin
Stuart Dootson5-Feb-09 4:02
professionalStuart Dootson5-Feb-09 4:02 
GeneralRe: connecting to mysql server in remote location .. Pin
Thilek5-Feb-09 5:30
Thilek5-Feb-09 5:30 
GeneralRe: connecting to mysql server in remote location .. Pin
Stuart Dootson5-Feb-09 6:13
professionalStuart Dootson5-Feb-09 6:13 
GeneralRe: connecting to mysql server in remote location .. Pin
Thilek5-Feb-09 23:18
Thilek5-Feb-09 23:18 
QuestionIShellFolder::SetNameOf() setting only virtual folders Pin
ab4rum5-Feb-09 2:26
ab4rum5-Feb-09 2:26 
AnswerRe: IShellFolder::SetNameOf() setting only virtual folders Pin
Stuart Dootson5-Feb-09 6:23
professionalStuart Dootson5-Feb-09 6:23 
GeneralRe: IShellFolder::SetNameOf() setting only virtual folders Pin
ab4rum7-Feb-09 0:28
ab4rum7-Feb-09 0:28 
QuestionNeed help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John5025-Feb-09 2:13
John5025-Feb-09 2:13 
AnswerRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson5-Feb-09 3:03
professionalStuart Dootson5-Feb-09 3:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.