Linker error: cannot include httpClient - cocos2d-x 3.2 - c++

error LNK2019: unresolved external symbol "public: static class cocos2d::network::HttpClient *
I am trying to make network call from cocos2d-x 3.2 and I am getting above error while compiling
I have included the file
include "network/HttpClient.h"
and I am getting error at
cocos2d::network::HttpClient::getInstance()->send(request);
Any help would be appreciated!

Issue resolved
right click on your project->add->references
add libnetwork from list.

Related

Error while building an application using protobuf on VS2013

I'm new to protobuf. I did the tutorials proposed by Google and everything was fine. I'm now trying to make my own application working and I get an error that I don't understand.
Error 1 error LNK2019: unresolved external symbol __imp__close referenced in function "public: bool __thiscall google::protobuf::io::FileInputStream::CopyingFileInputStream::Close(void)" (?Close#CopyingFileInputStream#FileInputStream#io#protobuf#google##QAE_NXZ) D:\Projets\bin\pb_decoder\libprotobuf.lib(zero_copy_stream_impl.obj) pb_decoder_pck
Error 2 error LNK2019: unresolved external symbol __imp__read referenced in function "public: virtual int __thiscall google::protobuf::io::FileInputStream::CopyingFileInputStream::Read(void *,int)" (?Read#CopyingFileInputStream#FileInputStream#io#protobuf#google##UAEHPAXH#Z) D:\Projets\bin\pb_decoder\libprotobuf.lib(zero_copy_stream_impl.obj) pb_decoder_pck
Error 3 error LNK2019: unresolved external symbol __imp__write referenced in function "public: virtual bool __thiscall google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Write(void const *,int)" (?Write#CopyingFileOutputStream#FileOutputStream#io#protobuf#google##UAE_NPBXH#Z) D:\Projets\bin\pb_decoder\libprotobuf.lib(zero_copy_stream_impl.obj) pb_decoder_pck
I didn't use protobuf in my code for now. The only thing I wrote is
#include "helloworld.pb.h"
and my helloword.proto looks like that :
syntax = "proto3";
message Hello {
int32 id = 1;
string name = 2;
}
Any idea about the problem here ?
unresolved symbols sounds like a missing like error to me but the libs are actually here.
I found a post on groups.google which was pointing out a problem quite similar to my own issue, but it didn't work for me.
Problem with linking runtime libraries on Windows for C++
Context
protobuf version 3.0
IDE : Visual Studio 2013
My application is a RTMAPS diagram (sofware quite similar to simulink), in case someone heard about this :)
Thanks guys for your help !
EDIT :answer is in the question :)
The link I gave in my question is actually the answer to my question. I just didn't correct the files correctly.
It is however strange that I'm the only one getting this error on the last version of protobuf (3.0).
Here is the link once again :
Problem with linking runtime libraries on Windows for C++
I hope it will be helpful to someone !

configuration VS2010 for GreedyProjectionTriangulation

I have a code based on PCL 1.6, using functions as OrganizedFastMesh and Poisson, and it works well. But When I add this code to use GreedyProjectionTriangulation function VS2010 return this error:
*Error 51 error LNK2001: unresolved external symbol "private: virtual void __cdecl pcl::GreedyProjectionTriangulation::performReconstruction(class std::vector > &)" (?performReconstruction#?$GreedyProjectionTriangulation#UPointXYZ#pcl###pcl##EEAAXAEAV?$vector#UVertices#pcl##V?$allocator#UVertices#pcl###std###std###Z) C:...\pcl_surface.obj*
Does it need an additional file.lib to include?
Which ones? Or what else?
Thank you!
A few days ago,the same error occurred in my code (with two similar errors).
I added the lib file /lib/pcl_features_debug.lib to the linker-->input, and it works.
VS2010(X64) debug mode

error LNK2019: unresolved external symbol _Direct3DCreate9Ex#8 referenced in function "protected: XYX()"

I am getting the following LINK error while compiling my C++ solution:
error LNK2019: unresolved external symbol _Direct3DCreate9Ex#8
referenced in function "protected: XYX()
The symbol "Direct3DCreate9Ex' is defined in "ddraw.h" header file found in "C:\Program Files\Microsoft SDKs\Windows\v7.0\Include". And verified that the header file "ddraw.h" is present in this location. Also I have included this path in VS settings "Tools-->Options-->VC++ Directories -> Includes".
But still I am getting the link error as "error LNK2019: unresolved external symbol _Direct3DCreate9Ex#8 referenced in function "protected: XYX()" ".
Can anyone kindly help me in getting rid of this link error while compiling my C++ solution.
I am using VS 2008 on 64 bit Win7.
Thanks in advance.
Based on reference page for Direct3DCreate9Ex you need to link with D3D9.lib.

unresolved external symbol __imp__wcsstr

I am getting the following linking error : libOpenSSL.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__wcsstr while linking he openssl library to my project. But this looks like a generic error than a openssl error.
Anybody having any idea, i am missing to include any windows library?
I resolved this error. Need to include Msvcrt.lib to resolve this error.

cannot open file 'LIBC.lib'

I changed a workspace developed in VC 6.0 to VS 2008. When I tried to build the workspace I am getting the following error message. How can I correct the problem?
fatal error LNK1104: cannot open file 'LIBC.lib'
I am getting the following messages when I ignored libc.lib
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) class CIHoTSimEngine * __cdecl CreateHoTSimEngine(void)" (__imp_?CreateHoTSimEngine##YAPAVCIHoTSimEngine##XZ) referenced in function "private: int __thiscall CHoTSimV2Doc::Init(void)" (?Init#CHoTSimV2Doc##AAEHXZ) HoTSimV2Doc.obj HoTSimV2
Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) class CIFABConnect * __cdecl CreateFabConnectServer(void)" (__imp_?CreateFabConnectServer##YAPAVCIFABConnect##XZ) referenced in function "private: int __thiscall CHoTSimV2Doc::Init(void)" (?Init#CHoTSimV2Doc##AAEHXZ) HoTSimV2Doc.obj HoTSimV2
Error 3 fatal error LNK1120: 2 unresolved externals D:\Projects\AsWorxSim\Bin\Release\HoTSim2.0.exe 1 HoTSimV2
Project Property -> Configuation Properties -> Linker -> Input -> Ignore Specific Library
Ignore the LIBC.LIB
Edit: I think once you remove the LIBC.lib as mentioned above, you are moving ahead with your linking and getting errors which exist in your app. You should try to look in these errors now. Think about it, if libc.lib was missing in the first place then how could it provide any linkage which seems to have appeared after you ignored it.
Command line option:
cl source.cpp /link /NODEFAULTLIB:LIBC.LIB
look here:
Discussion about libc on microsoft forum that's for vs2005 but for 2008 it is the same...
You need to "Rebuild All", to make sure you don't have any .obj files from VC6 hanging around.