Windows DLL

Asked by BADEUIL

Does anybody have used the DLL on WIN32 with Visual Studio ?

I have problme with charging the decompressor DLL.

Question information

Language:
French Edit question
Status:
Solved
For:
rohc Edit question
Assignee:
No assignee Edit question
Solved by:
BADEUIL
Solved:
Last query:
Last reply:
Revision history for this message
Didier Barvaux (didier-barvaux) said :
#1

Hello,

I've no experience with Visual Studio, so I cannot help you. Maybe someone else on the list could. Does is happen also with the compressor DLL? What is the error you encounter when charging the decompressor DLL? Did you try with the new DLL that includes old common/compressor/decompressor DLLs into one single DLL?

In the meanwhile, did you try with either MinGW or Cygwin? I know for sure that they work. I test them at regular interval of time. See the installation instructions on the wiki:
 - mingw: https://rohc-lib.org/wiki/doku.php?id=library-install-sources#cross-compilation_for_microsoft_windows_on_unix-like_systems
 - cygwin: https://rohc-lib.org/wiki/doku.php?id=library-install-sources#build_for_microsoft_windows_with_cygwin

Regards,
Didier

Revision history for this message
BADEUIL (thierry-badeuil-b) said :
#2

Hello,

The 3 DLLs are well created : the common one, comp one and decomp one. The .dll.a are also created for the linking process under Visual. I have followed the wiki procedure.

When I start the execution of my application, the executable is looking for a decompression procedure in the the compressor DLL and not in the decompressor DLL. I do not understand why.

As I explore each DLLs, the decompression procedure exists in the DLL decompression and not in the compression one.

Regards

Revision history for this message
Didier Barvaux (didier-barvaux) said :
#3

Hello,

The problem might be caused by the dependencies between the 3 libraries:
 - librohc_comp depends on librohc_common and librohc_decomp
 - librohc_decomp depends on librohc_common

If you're using the 1.7.0 release, there is a new librohc library (look at the root of the src/ directory for the files). This library depends on the previous 3 ones. You might try to link your application with it instead of the 3 others.

If it doesn't work either, please give a try to the master branch on github [1]. The 3 librohc_* libraries are gone. All the code is in the single librohc library. There is no inter-libraries dependencies anymore That might well fix your problem too.

Regards,
Didier

[1] https://github.com/didier-barvaux/rohc

Revision history for this message
BADEUIL (thierry-badeuil-b) said :
#4

Hello,

I work with the 1.7.0 release.

As I generated the librairies I have the following things :
 - in the src directory : librohc.la which did not work on Visual Studio
 - in the src/.libs directory : cygrohc-0.dll and cygrohc-0.dll.a. The .a file works on Visual Studio but contained nothing important (no definition for compression or decompression). So the linking process stopes rapidely with errors.
 - in the src/common/.libs, src/comp/.libs and src/decomp/.libs the 3 DLLs and the 3 .a files I need to link. It is with these 3 DLLs I have problems.

I have no files for the link in the /src directory (.a file).

I think I need the single block library. Can you send me the files because I do not know how to use git to have it ? I need the dll.a and the .dll files please !

Regards

Thierry

Revision history for this message
BADEUIL (thierry-badeuil-b) said :
#5

In fact I am interested by a makefile which produces onlye one DLL and not 3. I am not interesetd in the dependencies between the 3.

Regards

Revision history for this message
Didier Barvaux (didier-barvaux) said :
#6

Hello,

> I think I need the single block library. Can you send me the files because
> I do not know how to use git to have it ? I need the dll.a and the .dll files
> please !

Do yourself a favor, learn Git:
* Git tutorial: http://www.git-scm.com/book/en/v1/Getting-Started
* Getting a repository: http://www.git-scm.com/book/en/v1/Git-Basics-Getting-a-Git-Repository
* In short: git clone https://github.com/didier-barvaux/rohc.git

Or, as an alternate solution: go to https://github.com/didier-barvaux/rohc and click on the "Download ZIP" button in the column on the right side of the page.

> In fact I am interested by a makefile which produces onlye one DLL and
> not 3. I am not interesetd in the dependencies between the 3.

The master branch on github provides exactly what you want.

Regards,
Didier

Revision history for this message
BADEUIL (thierry-badeuil-b) said :
#7

Didier,

I try your solution and the make does not work. I have an error with the file feedback_parse.h because of the rohc.h file. I think it is because this file containes only "../rohc.h".

For that I did :
 1/ ./autogen.sh --prefix=/usr
 2/ ./configure --prefix=/usr
 3/ make clean
 4/ make all

Do you confirm that ?

If I copy the 5 files (rohc.h, rohc_buf.h, rohc_packets.h, rohc_time.h and rohc_traces from the directory src/common to src/common/rohc, It works but I am not sure for the result. I have .dll.a and .dll files in the src/.libs directory.

Regards

Revision history for this message
BADEUIL (thierry-badeuil-b) said :
#8

Didier,

An other question : what is the version number of the downloaded library ? 1.7.0, 1.7.1 or 2.0.0 ?

As I run make check, it appears to be the 2.0.0 one.

The name of the generated dll file is cygrohc-3.dll.

Regards

Revision history for this message
Didier Barvaux (didier-barvaux) said :
#9

> I try your solution and the make does not work. I have an error with
> the file feedback_parse.h because of the rohc.h file. I think it is
> because this file containes only "../rohc.h".

I think that your platform (Windows?) doesn't handle symbolic links correctly. Or maybe the ZIP file generated by github if you used it. The files in the src/common/rohc/, src/comp/rohc/ and src/decomp/rohc/ directories are symbolic links.

> For that I did :
> 1/ ./autogen.sh --prefix=/usr
> 2/ ./configure --prefix=/usr
> 3/ make clean
> 4/ make all
>
> Do you confirm that ?

It's fine. Step 2 is redundant with step 1, but its ok.

> If I copy the 5 files (rohc.h, rohc_buf.h, rohc_packets.h, rohc_time.h
> and rohc_traces from the directory src/common to src/common/rohc,
> It works but I am not sure for the result. I have .dll.a and .dll files in
> the src/.libs directory.

It confirms my hypothesis above. Check the symbolic links. Maybe the ZIP file.

Regards,
Didier

Revision history for this message
Didier Barvaux (didier-barvaux) said :
#10

> An other question : what is the version number of the downloaded library ? 1.7.0, 1.7.1 or 2.0.0 ?
>
> As I run make check, it appears to be the 2.0.0 one.
>
> The name of the generated dll file is cygrohc-3.dll.

The master branch is the future not-yet-released version 2.0.0 of the library.

Regards,
Didier

Revision history for this message
BADEUIL (thierry-badeuil-b) said :
#11

I think your zip has errors. The symbolic links are ok.

I test the execution with Visual the one DLL and say what !

Revision history for this message
Didier Barvaux (didier-barvaux) said :
#12

Hello,

> I think your zip has errors. The symbolic links are ok.

I'm confused. You now say that the symbolic links are fine, but previously you said that the file contained only "../rohc.h"... Both cannot be true at the same time.

> I test the execution with Visual the one DLL and say what !

OK. Let me know the result.

Regards,
Didier

Revision history for this message
BADEUIL (thierry-badeuil-b) said :
#13

Hello,

It seems to work now.

Regards !

Revision history for this message
sleepswallow (sleepswallow128) said :
#14

Hello BADEUIL:
     I want to make the ROHC DLL on WIN32 with Visual Studio. I need some help from you ,thanks first!
    First: what is the version number of the your using rohc library ? master branch or 1.7.0 or others?
   Second:what is the version number of the your using Visual Studio ? Visual Studio2005 or others?
   Thirdly: how quickly to make the ROHC DLL on WIN32 with Visual Studio? what need I to take care ?

   thank BADEUILvery much~~

    Regards,
    sleepswallow

Revision history for this message
sleepswallow (sleepswallow128) said :
#15

Hello Didier:
           I am back to ask for some help from you , thanks first!

       I want to make the ROHC DLL on WIN32 with Visual Studio. I need some help from you!
     can the cygwin make the ROHC DLL, can the Visual Studio code call the ROHC DLL ? what require ithe runtime environment ?

    thank Didier very much~~

    Regards,
    sleepswallow

Revision history for this message
BADEUIL (thierry-badeuil-b) said :
#16

Hello,

First : 1.7.0
Second : Visual Studio 2010 but it should work on 2005 also. But it dos not work with Visual Studio. You have to built the libraries with Cygwin.
Third : one hour at least

Regards

Revision history for this message
sleepswallow (sleepswallow128) said :
#17

Hello,

    thank you very much!

Second : Visual Studio 2010 but it should work on 2005 also. But it dos not work with Visual Studio. You have to built the libraries with Cygwin.
    I do not see what you mean.
      I must built the libraries( namelyi ROHC DLL )with Cygwin,then call the ROHC DLL with Visual Studio 2010,yes or no?

    Can not build the ROHC DLL on WIN32 with Visual Studio?
    Thanks~~

   Regards,
       sleepswallow

Revision history for this message
BADEUIL (thierry-badeuil-b) said :
#18

You can use the DLL on Visual Studio 2005 or 2010.

But to built the DLL, you must use Cygwin. Some libraries and keywords do not exist on WIN32 (Visual Studio).

Revision history for this message
sleepswallow (sleepswallow128) said :
#19

Hello,

      Thank you very much!

       I will build the Cygwin environment. except installing Cygwin on WIN32 ,do it need to install other tools?

      How long does it take you to built the DLL on Cygwin?

      Thanks!

   Regards,
       sleepswallow

Revision history for this message
BADEUIL (thierry-badeuil-b) said :
#20

No other tools are needed.

10minutes max for building the DLL on Cygwin.

Revision history for this message
sleepswallow (sleepswallow128) said :
#21

Hello BADEUIL:

     I meet some questions, I need to get some help from you ,thanks!

    I builded the librohc.lib on the Cygwin environment. then I use the LIB on Visual Studio 2010,the error is :
  1>librohc.lib(c_ip.o):error LNK2001:无法解析的外部符号__assert
    ....
    1>librohc.lib(rohc_comp.o):error LNK2019:无法解析的外部符号__getreent
    ..
  How to resolve this kind of problems.

      Thanks!

   Regards,
       sleepswallow