Hi all
i have been trying to make dynamic linked library from the code in visual studio 6
I made a empty Dynamic Link Library project in visual c++ 6 and added files present in src folder to this project and just pressed build
and it gave me these errors
--------------------Configuration: xmlrpc - Win32 Debug--------------------
Compiling...
XmlRpcClient.cpp
XmlRpcDispatch.cpp
XmlRpcServer.cpp
XmlRpcServerConnection.cpp
XmlRpcServerMethod.cpp
XmlRpcSocket.cpp
XmlRpcSource.cpp
XmlRpcUtil.cpp
XmlRpcValue.cpp
Linking...
XmlRpcDispatch.obj : error LNK2001: unresolved external symbol ___WSAFDIsSet@8
XmlRpcDispatch.obj : error LNK2001: unresolved external symbol __imp__select@20
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__socket@12
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__WSAStartup@8
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__closesocket@4
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__ioctlsocket@12
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__setsockopt@20
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__bind@12
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__htons@4
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__htonl@4
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__listen@8
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__accept@12
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__connect@12
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__gethostbyname@4
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__recv@16
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__send@16
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0
Debug/xmlrpc.dll : fatal error LNK1120: 17 unresolved externals
Error executing link.exe.
xmlrpc.dll - 18 error(s), 0 warning(s)
I need your help to make dynamic dll
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'am having a problem like your even if I am only trying to use xml-rpc lib in a win32 console app and not dlls.
I have same compiler error except that it is LNK2019:
1>XmlRpcDispatch.obj : error LNK2019: riferimento al simbolo esterno ___WSAFDIsSet@8 non risolto nella funzione "public: void __thiscall XmlRpc::XmlRpcDispatch::work(double)" (?work@XmlRpcDispatch@XmlRpc@@QAEXN@Z)
1>XmlRpcDispatch.obj : error LNK2019: riferimento al simbolo esterno __imp__select@20 non risolto nella funzione "public: void __thiscall XmlRpc::XmlRpcDispatch::work(double)" (?work@XmlRpcDispatch@XmlRpc@@QAEXN@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__socket@12 non risolto nella funzione "public: static int __cdecl XmlRpc::XmlRpcSocket::socket(void)" (?socket@XmlRpcSocket@XmlRpc@@SAHXZ)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__WSAStartup@8 non risolto nella funzione "void __cdecl initWinSock(void)" (?initWinSock@@YAXXZ)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__closesocket@4 non risolto nella funzione "public: static void __cdecl XmlRpc::XmlRpcSocket::close(int)" (?close@XmlRpcSocket@XmlRpc@@SAXH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__ioctlsocket@12 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::setNonBlocking(int)" (?setNonBlocking@XmlRpcSocket@XmlRpc@@SA_NH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__setsockopt@20 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::setReuseAddr(int)" (?setReuseAddr@XmlRpcSocket@XmlRpc@@SA_NH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__bind@12 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::bind(int,int)" (?bind@XmlRpcSocket@XmlRpc@@SA_NHH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__htons@4 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::bind(int,int)" (?bind@XmlRpcSocket@XmlRpc@@SA_NHH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__htonl@4 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::bind(int,int)" (?bind@XmlRpcSocket@XmlRpc@@SA_NHH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__listen@8 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::listen(int,int)" (?listen@XmlRpcSocket@XmlRpc@@SA_NHH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__accept@12 non risolto nella funzione "public: static int __cdecl XmlRpc::XmlRpcSocket::accept(int)" (?accept@XmlRpcSocket@XmlRpc@@SAHH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__connect@12 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::connect(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,int)" (?connect@XmlRpcSocket@XmlRpc@@SA_NHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__gethostbyname@4 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::connect(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,int)" (?connect@XmlRpcSocket@XmlRpc@@SA_NHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__recv@16 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::nbRead(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,bool *)" (?nbRead@XmlRpcSocket@XmlRpc@@SA_NHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PA_N@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__send@16 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::nbWrite(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,int *)" (?nbWrite@XmlRpcSocket@XmlRpc@@SA_NHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAH@Z)
1>C:\Users\Luca\Documents\Visual Studio 2008\Projects\ProvaRPC\Debug\ProvaRPC.exe : fatal error LNK1120: 16 esterni non risolti
1>Il log di compilazione è stato salvato in 'file://c:\Users\Luca\Documents\Visual Studio 2008\Projects\ProvaRPC\ProvaRPC\Debug\BuildLog.htm'
1>ProvaRPC - 17 errore/i, 1 avviso/i
========== Compilazione: 0 completate, 1 non riuscite, 0 aggiornate, 0 ignorate ==========
Is anyone who can help with this?
Thanks
Luca
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
okay i have found solution to this problem
its very simple
make a new project win32 empty c++ in vs 2005
select dll and export symbols from wizard
copy all the src folder files to this newly created project and try to compile it
now add a new .cpp and .h file in project name them example.cpp and example.h
stdafx.h file should look like this
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
example.h should look like this
#include <string.h>
extern "C" __declspec(dllexport) int AddSomeNumbers(int numOne, int numTwo);
and example.cpp should look like this
int AddSomeNumbers(int numOne, int numTwo)
{
return numOne + numTwo;
}
you can change .cpp to create a server and a client
let me know if anyone needs more help
thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I could solve the problem eliminating all the code that was made for unix and leaving the windows code and adding the winsock2 library to the project.
I also made a change to the library because I encountered a problem when in the server's response there are short tags like <string/> or <data/>.
The parser couldn't recognize those tags and cancelled all the data received so I had to fix this bugs.
If anyone would need this correction could contact me.
bye
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all
i have been trying to make dynamic linked library from the code in visual studio 6
I made a empty Dynamic Link Library project in visual c++ 6 and added files present in src folder to this project and just pressed build
and it gave me these errors
--------------------Configuration: xmlrpc - Win32 Debug--------------------
Compiling...
XmlRpcClient.cpp
XmlRpcDispatch.cpp
XmlRpcServer.cpp
XmlRpcServerConnection.cpp
XmlRpcServerMethod.cpp
XmlRpcSocket.cpp
XmlRpcSource.cpp
XmlRpcUtil.cpp
XmlRpcValue.cpp
Linking...
XmlRpcDispatch.obj : error LNK2001: unresolved external symbol ___WSAFDIsSet@8
XmlRpcDispatch.obj : error LNK2001: unresolved external symbol __imp__select@20
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__socket@12
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__WSAStartup@8
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__closesocket@4
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__ioctlsocket@12
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__setsockopt@20
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__bind@12
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__htons@4
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__htonl@4
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__listen@8
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__accept@12
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__connect@12
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__gethostbyname@4
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__recv@16
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__send@16
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0
Debug/xmlrpc.dll : fatal error LNK1120: 17 unresolved externals
Error executing link.exe.
xmlrpc.dll - 18 error(s), 0 warning(s)
I need your help to make dynamic dll
Thanks
Hi,
I'am having a problem like your even if I am only trying to use xml-rpc lib in a win32 console app and not dlls.
I have same compiler error except that it is LNK2019:
1>XmlRpcDispatch.obj : error LNK2019: riferimento al simbolo esterno ___WSAFDIsSet@8 non risolto nella funzione "public: void __thiscall XmlRpc::XmlRpcDispatch::work(double)" (?work@XmlRpcDispatch@XmlRpc@@QAEXN@Z)
1>XmlRpcDispatch.obj : error LNK2019: riferimento al simbolo esterno __imp__select@20 non risolto nella funzione "public: void __thiscall XmlRpc::XmlRpcDispatch::work(double)" (?work@XmlRpcDispatch@XmlRpc@@QAEXN@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__socket@12 non risolto nella funzione "public: static int __cdecl XmlRpc::XmlRpcSocket::socket(void)" (?socket@XmlRpcSocket@XmlRpc@@SAHXZ)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__WSAStartup@8 non risolto nella funzione "void __cdecl initWinSock(void)" (?initWinSock@@YAXXZ)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__closesocket@4 non risolto nella funzione "public: static void __cdecl XmlRpc::XmlRpcSocket::close(int)" (?close@XmlRpcSocket@XmlRpc@@SAXH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__ioctlsocket@12 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::setNonBlocking(int)" (?setNonBlocking@XmlRpcSocket@XmlRpc@@SA_NH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__setsockopt@20 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::setReuseAddr(int)" (?setReuseAddr@XmlRpcSocket@XmlRpc@@SA_NH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__bind@12 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::bind(int,int)" (?bind@XmlRpcSocket@XmlRpc@@SA_NHH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__htons@4 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::bind(int,int)" (?bind@XmlRpcSocket@XmlRpc@@SA_NHH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__htonl@4 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::bind(int,int)" (?bind@XmlRpcSocket@XmlRpc@@SA_NHH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__listen@8 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::listen(int,int)" (?listen@XmlRpcSocket@XmlRpc@@SA_NHH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__accept@12 non risolto nella funzione "public: static int __cdecl XmlRpc::XmlRpcSocket::accept(int)" (?accept@XmlRpcSocket@XmlRpc@@SAHH@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__connect@12 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::connect(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,int)" (?connect@XmlRpcSocket@XmlRpc@@SA_NHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__gethostbyname@4 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::connect(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,int)" (?connect@XmlRpcSocket@XmlRpc@@SA_NHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__recv@16 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::nbRead(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,bool *)" (?nbRead@XmlRpcSocket@XmlRpc@@SA_NHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PA_N@Z)
1>XmlRpcSocket.obj : error LNK2019: riferimento al simbolo esterno __imp__send@16 non risolto nella funzione "public: static bool __cdecl XmlRpc::XmlRpcSocket::nbWrite(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,int *)" (?nbWrite@XmlRpcSocket@XmlRpc@@SA_NHAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAH@Z)
1>C:\Users\Luca\Documents\Visual Studio 2008\Projects\ProvaRPC\Debug\ProvaRPC.exe : fatal error LNK1120: 16 esterni non risolti
1>Il log di compilazione è stato salvato in 'file://c:\Users\Luca\Documents\Visual Studio 2008\Projects\ProvaRPC\ProvaRPC\Debug\BuildLog.htm'
1>ProvaRPC - 17 errore/i, 1 avviso/i
========== Compilazione: 0 completate, 1 non riuscite, 0 aggiornate, 0 ignorate ==========
Is anyone who can help with this?
Thanks
Luca
okay i have found solution to this problem
its very simple
make a new project win32 empty c++ in vs 2005
select dll and export symbols from wizard
copy all the src folder files to this newly created project and try to compile it
now add a new .cpp and .h file in project name them example.cpp and example.h
stdafx.h file should look like this
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
example.h should look like this
#include <string.h>
extern "C" __declspec(dllexport) int AddSomeNumbers(int numOne, int numTwo);
and example.cpp should look like this
int AddSomeNumbers(int numOne, int numTwo)
{
return numOne + numTwo;
}
you can change .cpp to create a server and a client
let me know if anyone needs more help
thanks
I could solve the problem eliminating all the code that was made for unix and leaving the windows code and adding the winsock2 library to the project.
I also made a change to the library because I encountered a problem when in the server's response there are short tags like <string/> or <data/>.
The parser couldn't recognize those tags and cancelled all the data received so I had to fix this bugs.
If anyone would need this correction could contact me.
bye
vc++6.0
Linking…
XmlRpcDispatch.obj : error LNK2001: unresolved external symbol ___WSAFDIsSet@8
XmlRpcDispatch.obj : error LNK2001: unresolved external symbol __imp__select@20
XmlRpcSocket.obj : error LNK2001: unresolved external symbol __imp__socket@12
… …
answer:
#pragma comment(lib,"Ws2_32.lib")
in xmlRpcSource.h
#if defined(_MSC_VER)
# pragma warning(disable:4786) // identifier was truncated in debug info
# pragma comment(lib,"Ws2_32.lib") // new code
#endif