mainRAPP - Raster Processing Primitives - Support: sr #108437, Unable to (correctly) link with a...

 
 

sr #108437: Unable to (correctly) link with a cygwin-built librapp from a Visual Studio program

Submitter:  Alberto Avanzi <aavanzi1976>
Submitted:  Fri 08 Nov 2013 08:44:42 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  5 - Blocker Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  Microsoft Windows
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 30 Sep 2014 06:25:32 PM UTC, comment #1: 

Sorry, I have no experience with cygwin or mingw and no clues as to what could be the problem - unless it's a linker problem, so my shot in the dark would be to try a newer version of binutils (i.e. a newer cygwin unless you know how to update it separately).

Hans-Peter Nilsson <hpataxis>
Group administrator
Fri 08 Nov 2013 08:44:42 PM UTC, original submission:  

Hello,

I need to build librapp (release 0.7) under Microsoft Windows for being able to use it in a Visual Studio project.

So, I managed to build librapp 0.7 under windows by using cygwin and MinGw. The build apparently succeeded, because I
have a librapp.dll.a to link with and a librapp-0.dll to dynamically load at runtime.

Problems start here. When I try to link with the windows-built librapp (so I try to link C++ code developed and built by Visual
Studio 2010 with this MinGw version of librapp), the link succeeds, but I'm only able to execute the final binary in debug mode (and the binary behaves as expected).

As soon as I launch the release version, I have really weird problems (like my exe complaining that it can't find in librapp-0.dll symbols and objects that are defined in a completely different, unrelated (openCV) DLL, which is also available for dynamic load).

I did not find a solution to this problem, so I tried to build the static version of rapp, by adding to "configure" the parameter --enable-static=yes
The build produces a librapp.a library that has approximatively the "good" size (i.e. a size comparable to the DLL one), but I can't link with it because Visual Studio does not find any symbol in it (even Depends.exe tells that the library does not contain any rapp-related symbol).

So, I have several questions:
a) is using cygwin/minGW the unique (or the best) way for building librapp under windows? Do you have detailed instructions
on how to proceed?
b) any idea of what I did wrong that prevents me from executing in release mode?
c) any idea of what I did wrong that prevents the static version of the library from linking correctly?

Thanks for your support and help.

Alberto Avanzi <aavanzi1976>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hpataxis (Posted a comment)
  • -email is unavailable- added by aavanzi1976 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code