Thread: [Dev-C++] Problems with linking to a VC++-lib
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Wolfgang W. <W.W...@as...> - 2006-01-25 15:25:38
|
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 |
|
From: David M. <jac...@sb...> - 2006-01-25 16:11:01
|
Your task is to remove me from your mailing list or at least have one of your genious associates fix the unsubscribe page. Wolfgang Wegner <W.W...@as...> 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 |
|
From: Per W. <pw...@ia...> - 2006-01-25 18:02:55
|
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. /Per W 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 > |