Build errors while setting up libtins on Windows. sys/time.h and other errors

180 views
Skip to first unread message

Adrian Costin

unread,
Apr 14, 2019, 12:41:27 PM4/14/19
to libtins
Hello.
I have encountered problems while trying to use the library. I am using Visual Studio 2017, and have included all the directories needed and linked everything or so i think.
I am getting an errors upon building the default program you can find on the website to check if everything works properly.

Errors are as follows:


I will also provide my project include and library folders down below :



I do not know where this problem comes from, and I am leaving this here in hopes that someone can help me a bit.
Only possible thing i can think of is that the pcap.h file chooses unix. I do not know if this is true or not, but i would greatly appreciate some help.

Also, I do not know where to put the TINS_STATIC thing as directed on the step by step installation guide on the site, that may cause the problem too maybe..

I basically just took the precompiled library and includes, copied them to my project and then copied the winpcap developer pack libraries and includes too. I don't know why this does not work and is giving me build errors.

Adrian Costin

unread,
Apr 14, 2019, 2:12:49 PM4/14/19
to libtins
UPDATE ..
I got it to compile without errors by adding preprocessor definitions as follows:

 Afterwards I ran into other problems while running the example from the site:


Handling the exception by breaking gives an output as follows :


It seems to be missing some pdb files. I do not know why this is happening. Is it something about those .dll files ?
Also , when attempting to run the executable file this error pops up:


Any help or suggestions as of why this happens would be greatly appreciated.
Message has been deleted

Alvaro Coronado

unread,
Jul 17, 2019, 12:29:25 PM7/17/19
to libtins
Hi Adrian Costin, i used other config in visual studio 2015,


i seed you use the libtins.lib, this it the static config for libtins, but, are you compile libtins in your pc?.

in these case i proposed, at you try the next config, first, your package wpcad is the developer this ok, in my experience: the best sitie for unzip the develop wpcal is C: Disk,
your can intented a path with of next: C:\mylibraryc++\,

if you unzip ok, hands on.

  • in yout visual studio,  you see same at:
  • clik rigth in the project, go to propierties:
  • in the window property,(the recent open window) go to "VC++ directories",and selected
  • in the opcions for "vc++ directories" selected "include", and you include path of C:\mylibraryc++\WpdPack_4_1_2\include
  • and a posible result in my case it is:
  • in the "vc++ directories" selected, go to "library directories"  and repeat, but need change the folder, at the folder the Lib, see picture, in the red rectangle:
  • ok, were you have selected "vc++ directories", change the option to "linker" and go to "input" >> aditional depends and add wpcap.lib see picture
  • in this moment your app build, but generate two problems the first its the crono.h this a warning, in my develop,this it  no generate nothing problem, the second is the fault, lack, need,etc. of "WIN_32"prefix, in these case, you go to "propierties", and the window propierties go to  "C/C++" and "Procesor" >> "Preporcessor Definitions", add WIN32 see picture
  • Ok, in this moment your app build and compile, with alone warning of the crono.h, the next is build libtins, i explain the two forms for build. with visual and the cmake GUI and cmake cmd.
i hope this is most help you. i want wait for you response and go to the compile build libtins, happu day. :)

Adrian Costin

unread,
Mar 18, 2021, 11:49:52 AM3/18/21
to libtins
Hello. I know this is a really late reply, but thank you for your input. It really helped me out, have a nice day! 
Reply all
Reply to author
Forward
0 new messages