I've been having fun with Waffles command lines, and now I am ready to combine it in my other project. However, my other project uses DLLs and because the sizes of the dependent libraries, I'm dreading about the bugs already if I try to convert them into lib projects. (I use PCL, vtk, NITE) So I am trying to build waffles DLLs so I can use them together. (Multi-threaded DLL option /MD)
But, I couldn't compile Waffles this way. Errors I get are all LNK2028 and LNK2019 from GSocket.obj, so I installed the latest Windows SDK as the FAQ suggested, but the errors are still there. I think I installed SDK correctly because $(WindowsSDKDir) is set to the right installation folder.
LNK2028 : unresolved token in GTCP or GSocket functions
LNK2019 : unresolved external symbol in GSocket
By the way, I want to thank you for such great library. I love everything about waffles I encountered so far : the name, simplicity, demos, documentations, conciseness and easiness. I hope I can contribute to it too someday!
You seem to have CSS turned off.
Please don't fill out this field.
I think the LNK2019 error implies the two following conditions:
1- Some code somewhere in your application is using the "GSocket" class as if it were statically linked.
2- GSocket.obj is not being statically linked to your application.
It sounds like #2 is deliberate, since you have moved it into a dll. So, the solution would be to get rid of condition #1 by finding the code that is using the GSocket class in a static manner, and removing that code. I would venture to guess that there is a good chance you are not using the GSocket class at all, so it is only being referenced from somewhere else within GClasses code, and probably by another class that you are not using either. The GHttp, GDynamicPage, GLoadBalance, and GSMTP all use GSocket. If possible, you might consider just nuking all of these, and see if that doesn't fix the problem.
I am not familiar with the LNK2028 error. Some forums (such as http://stackoverflow.com/a/5687564) suggest this has something to do with using the "/clr" option.
Mike, thank you for your solution!
Removing GSocket and other files solved my problem. They all combined well as a DLL file, and I could use Waffles in my project :D
You guessed right that I did not need to use GSocket, so I excluded .h and .cpp files of GHttp, GDynamicPage and Gsmtp, (GLoadBalance was not in my version) and it all worked. LNK2028 errors disappeared by themselves too.
Thank you so much for your carefully written solution. Now I have some debugging to do on my project!
powguma<-Anonymous original poster
Sign up for the SourceForge newsletter: