Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>1) What do I do wrong? How may I run the project right from NB? I didn't try to install Windows SDK, I want to try with Cygwin tools as it has such kind of tools.</p> </blockquote> <p>Try this: <a href="http://forums.netbeans.org/ptopic44959.html" rel="nofollow noreferrer">http://forums.netbeans.org/ptopic44959.html</a></p> <blockquote> <p>2) What is the difference between Windows .lib files and Cygwin .a files? Is it better to install Windows SDK and just forget about those .a files?</p> </blockquote> <p>Both of these files in this particular case are called "import libraries". Import libraries are basically a file containing a list of valid functions, so that when you link your exe, the linker knows that those functions will exist in some particular DLL. So when you link to wsock32.lib or ws2_32.lib, the linker now knows that these functions will exist in wsock32.dll and ws2_32.dll. Thus, it will not complain. Now, the .lib import library format is Microsoft's format. GCC/unix/linux/mingw/cygwin etc. have a different format, and the extension for that format is <strong>.a</strong>. Now, cygwin/mingw etc. provide a <strong>ws2_32.a</strong> so that when using cygwin/mingw/gcc, the linker can read the import library in the correct format. cygwin/mingw/gcc will simply not understand the <strong>.lib</strong>. Microsoft provides the <strong>.lib</strong> files in their SDK, but I am not sure how this will help in this case. (Though the SDK <em>is</em> definitely useful, because it provides lots of <em>header files</em> and DLLs for other useful things you might need, but the import libraries are useless, because gcc/mingw/cygwin will not understand them; unless you use a converter tool, like the one mentioned in your <a href="https://stackoverflow.com/questions/12314779/ws2-32-lib-vs-libws2-32-a-whats-the-difference-and-how-to-link-libws2-32-to-n">duplicate question</a>).</p> <blockquote> <p>3) Is it possible to use #pragma comment(lib, "libws2_32.a") to link .a files? I've tried but didn't get success results.</p> </blockquote> <p>No, the #pragma linking comments are an MSVC specific (ugly IMO) extension. Use the linker options in the menus.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload