I used to have a PocketPC client application communicating with a desktop C++ server. Now, I'm porting the server to PocketPC so the whole thing can work on the PDA without an internet connection.
I'm having problems linking with the libraries' .lib files I'm using. For instance, I'm using sockets (Winsock2.h -- WS2_32.Lib). I include the .h, code compiles but doesn't link; then I add the .lib in the additionnal depencies, but still, it doesn't link (error LNK2019: unresolved external symbol ioctlsocket referenced in function "public: void __cdecl OBServer::InitializeServer(int,int)"...)
First of all, is a desktop .lib supposed to work right away in a smart device projet Or maybe it need to be recompiled or something like that
If not, any ideas what's wrong
Thank you

Linking with C++ static library in native C++ smart device projet
goh6613
Yes the device side libraries are unicode only, same is true for the APIs that character arrays as arguments.
Also it is possible to debug two different applications running within the same emulator. Unless your client and server projects are being deployed to different devices both of them should get deployed to the same emulator instance (I assume you are using VS 2005).
One of the way to have the server running before client starts and debug them both is:
-have the two projects in the same solution
-deploy them both to the device
-launch the server manually through the explorer on device, it shall bind to a socket and start listening.
-open the server project in another instance of VS > go to attach to process > set transport as smartdevice and set the device as the qualifier. This shall display the list of processes on the device. Attach to the server.
- now start debugging the client in the first VS instance.
Hope this helps.
Thanks
Walter Fuchs
Regarding first problem, CreateDirectory is declared in Winbase.h. Corresponding lib file required at link time is coredll.lib.
See the link http://msdn.microsoft.com/library/default.asp url=/library/en-us/wceobjst/html/cerefCreateDirectory.asp for CreateDirectory help for Windows CE.
For second problem, can you please elaborate your problem If you are using open source code, you need to recompile it for Windows or Windows CE.
Also, which Visual Studio version are you using for compilation
I hope it helps!
fabianus
Actually, even linking with coredll.lib didn't solve the problem, but you made me think about something to try. CreateDirectory was a macro calling CreateDirectoryA (I'm using non unicode). I tried calling CreateDirectoryW explicitly and it worked, leading me to think only unicode version is available.
For the second problem, I just coded by hand the fourier transform instead of using a library. Problem solved for now :)
The project is doing great now. I'm just wondering if it's possible to debug two applications at the same time in the same emulator. For instance, I have a console C++ server application listening on a socket and a client C# application writing on a socket (127.0.0.1). This is easily done on a desktop, but on a smart device, when I start both applications, I get two distinct emulators... It is possible to start my server "in the background" and then launch the client
Thanks again.
Cslom
So now, my sockets work but there's 2 problems left.
1- CreateDirectory of windows.h doesn't link
2- An open source library I'm using doesn't link. Any ideas on how I must recompile from source so that it'll work on smart device platform
Thank you