I am using 3rd party code in my application and I don't have libray file to link to my application. All I have a makefile and makefile.prg. Using these files is it possible to create .lib file? If yes, please guide me how to do this.
You should provide some more information. At least the name of the 3rd party code and the operating system you are using (makefile files are commonly used with Linux). The file extension .prg can be anything. It may be an input file for the makefile (reading its content may help).
If the code is Open Source, there should be some documentation on how to build a library (in the project documentation or by searching the web).
If it is not Open Source, you should contact the supplier of the code.
My application must work on a remote computer with ports 500 and
4500 on UDP-protocol, but it doesn't work.
I tried to test these ports by this udp-server.
Antivirus is switched off, Firewall too.
When I start udp-server as "timeserver 500" or as "timeserver 4500"
I get message: "Could not bind name to socket".
But with other ports it works. Why? (In the source code I do not
see any restrictions for port-numbers.)
On my local home computer - the same behavior!
Can anyone explain this?
//Pop the frame data from the font of list.
if (m_FrameList.size() == 0) return 0L;
pFrameData = m_FrameList.front();
... Decoder the frame data
// use following code to push the frame data to the list.
SMyFrameData* pNewFrame = new SMyFrameData();
pNewFrame->lpData = pBuf;
pNewFrame->iSize = iSize;
But now there is a error happen "erators and references can become invalid." in code, pFrameData = m_FrameList.front(); I just use the CCriticalSection to avoid the conflict, but why the error happen.
There's no capturing of pointers here, pFrameData is a std::list.
Only deleting a list node invalidates an iterator to it. Having an iterator to the first node then adding to the head is not a problem, you just end up with an iterator to the second item in the list (the same is true for pointers to list items).