Home » Community » Newbie corner » header file problem
Re: header file problem [message #24680 is a reply to message #24677] |
Wed, 27 January 2010 09:15   |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
Thanks for the help Anton.
I downloaded the ConnSock.rar, inzipped it and tried it without any changes. I get these errors:
main.obj : error LNK2019: unresolved external symbol "public: class Upp::String __thiscall Upp::Socket::R
eadUntil(char,int,int)" (?<a href="mailto:ReadUntil@Socket" target="_blank">ReadUntil@Socket</a>@Upp@@QAE?<a href="mailto:AVString@2" target="_blank">AVString@2</a<a href="mailto:>@DHH" target="_blank">>@DHH</a>@Z) referenced in function "class U
pp::String __cdecl Request(class Upp::String const &)" (?Request@@YA?AVString@Upp@@ABV12@@Z)
main.obj : error LNK2019: unresolved external symbol "bool __cdecl Upp::ClientSocket(class Upp::Socket &,
char const *,int,bool,unsigned long *,int,bool)" (?ClientSocket@Upp@@YA_<a href="mailto:NAAVSocket@1" target="_blank">NAAVSocket@1</a>@PBDH_NPAKH2@Z) r
eferenced in function "class Upp::String __cdecl Request(class Upp::String const &)" (?Request@@YA?AV
String@Upp@@ABV12@@Z)
main.obj : error LNK2019: unresolved external symbol "public: int __thiscall Upp::Socket::WriteWait(char
const *,int,int)" (?<a href="mailto:WriteWait@Socket" target="_blank">WriteWait@Socket</a>@Upp<a href="mailto:@@QAEHPBDHH" target="_blank">@@QAEHPBDHH</a>@Z) referenced in function "public: void __thiscal
l Upp::Socket::Write(char const *,int)" (?<a href="mailto:Write@Socket" target="_blank">Write@Socket</a>@Upp<a href="mailto:@@QAEXPBDH" target="_blank">@@QAEXPBDH</a>@Z)
C:\upp\out\MSC9.Debug.Debug_full\ConnSock.exe : fatal error LNK1120: 3 unresolved externals
That is strange since this code runs fine in the same directory.
#include <Web/Web.h>
using namespace Upp;
String Request(const String& r)
{
Socket s;
if(!ClientSocket(s, CommandLine().GetCount() ? CommandLine()[0] : "127.0.0.1", 5024)) {
Cout() << "Unable to connect to server!\n";
SetExitCode(1);
return Null;
}
s.Write(r + '\n');
String st = s.ReadUntil('\n');
Cout() << "st " << st << '\n';
return s.ReadUntil('\n');
}
CONSOLE_APP_MAIN
{
Cout() << Request("+") << '\n';
Cout() << Request("33") << '\n';
}
The "+" gets the location from another app (Nww) and returns the Latitude and Longitude (35.037613000,-117.968790000). All of my interaction with the Nww app is through a socket, GPS tracking, distance calculations with Vincenty, etc. I used Java before but am now porting to C++.
When I get something to work I copy it to a different location.
[Updated on: Wed, 27 January 2010 09:37] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed May 14 15:17:54 CEST 2025
Total time taken to generate the page: 0.00333 seconds
|