Re: [Dev-C++] Problems with linking to a VC++-lib
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2006-01-26 00:07:15
|
Important note: When M$ are involved, there can be no standard but what M$ does for the moment :) The ABI (Application Binary Interface) is something that must be specified for each and every target platform (OS and processor architecture) supported, i.e. it can normally not be the same between different platforms. Life is simple when the OS is written in C++ - then the OS manufacturer have already decided what ABI there should be. The current Windows releases are written with C interfaces and the future Windows releases will have .NET interfaces... This is a nice link to read: http://aegisknight.org/cppinterface.html One more little link: https://pyre.virge.net/cgi-bin/info2www?(gcc)Compatibility /Per W On Thu, 26 Jan 2006, Wolfgang Wegner wrote: > Hi, > On Wed, Jan 25, 2006 at 07:03:23PM +0100, Per Westermark wrote: > > When using C++ libraries, I would recommend you to use the same > > compiler that was used when creating the libraries. > > > > For C++, there is no single standard for the memory layout of data > > objects, the placement of virtual method tables, the name mangling etc. > > I almost can't believe it - if C++ is such a non-standardized crap^H^H^Hthing, > why does anybody use it at all? > > Or, another question, there are so many .dll's out there, how about > these? Are these only C interfaces, or are there other conventions > taken for compatibility? > If so, would it be useful to ask the original authors if I can > get a .dll version of the library? > > > /Per W > > Regards, > Wolfgang > > > > > On Wed, 25 Jan 2006, Wolfgang Wegner wrote: > > > > > Dear list members, > > > > > > I am quite new to windows and C++ programming (did quite much C under > > > unix up to now). > > > > > > My task is to write a program using a proprietary C++-API (device > > > driver) which I only have in a binary version for VC6 or VS.net. I > > > can compile using VC6, but would like to switch to Dev-C++ or plain > > > MinGW/gcc. However, when linking against the library, I always get > > > "undefined references" for the methods contained in the library. > > > > > > I tried converting the library using reimp, but apart from that it > > > works other than expected (it gives me a bunch of object files that I > > > can then again put together to a library using ar) this does not make > > > any difference. > > > > > > The API in question can be found here: > > > http://www.dektec.com/Downloads/Drivers.asp > > > (same results with both VC6 and VS.NET version). > > > > > > My program is at the moment a modified version of "DtRecord" on the > > > page "utilities", to get started. > > > > > > As already said, everything works fine with VC6, but I really would > > > like to move to gcc for using GTK+ and other stuff... I am using dev- > > > C++ 4.9.9.2 in the "full" version (including MinGW). > > > > > > I am not sure if it is really a "typical" VC++ problem or simply a > > > difference in calling convention - but in the latter case, I have > > > even less clue about how to get around it. Here an example nm output > > > of the Symbol TsOutpChannel::SetTsRateBsp: > > > My_Example.o: > > > U __ZN13TsOutpChannel12SetTsRateBpsEii > > > DTAPI.lib: > > > 00000000 T ?SetTsRateBps@TsOutpChannel@@QAEKHH@Z > > > For me it looks really strange, but I have absolutely no idea about > > > symbol names in C++, so maybe somebody else can say more seeing these > > > symbols... > > > > > > In case I left out some important information, please let me know. > > > > > > Regards, > > > Wolfgang > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > > > for problems? Stop! Download the new AJAX search engine that makes > > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > > > _______________________________________________ > > > Dev-cpp-users mailing list > > > Dev...@li... > > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > |