- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have got a question about linking with ICL. I hope anyone could point me out if it is possible to be done or not:
- I am working on Windows XP.
- I have created a library (dll) with g++ in MingGW.
- I would like to compile and link a program with ICL that uses that library. Is that possible?
I have tried to do it, however it seems that ICL does not recognize the classes included in that library.
Thank you very much in advance
Jaime
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Jennifer Jiang (Intel)
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But, does it mean that I can use classes contained in the .dll, or the extern "C" compatibility only works for functions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But, does it mean that I can use classes contained in the .dll, or the extern "C" compatibility only works for functions.
Hi
Probably require to use file def to inform directive "@.........."
also instruction compiler
-DDLLIMPORT=??? -L ....... (origin lib.a if used as converted process to dll)
About conflict ,normally no relation with Icc lib if correctly patched two side.
Normally can run.
Kind regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
old thread, but I want to clearify the answer.
You can't use the classes in the dll. The different mangling is often on purpose
to prevent you from runtime errors. There are other ABI issues like return
value handling, register handling, vtable, exception handling and so on. So, even if
you manage to solve the mangling issue the application wont run as expected.
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have doubt seriously that your clarification is true.
I have backend is not builded with Intel compiler works perfectly
when you call with an program origine builded intel compiler
if i remember exactly i have also already make with windows VC and ICC...
If impossible, I don't understand how could be
possible some DLL have not all same origin could sharing
sometimes all at system...
Maybe could be possible you have added recently an nail icc to lock..
download here an backend database PG
ftp://ftp.eenet.ee/pub/postgresql/projects/gborg/libpqpp/stable/libpq%2B%2B-4.0.tar.gz
make dll
start an instance engine database PG
build simple program with ICC and call backend with you see result...
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for getting back on that. I think I was imprecise and only gave the answer for the particular situation.
In fact there is absolutely no problem if you link a icc program against a libary build with MSVC and vice versa under windows. This is because icc is compatible with MSVC under windows.
The same is true under Linux for the icc and gcc, because under linux the icc is compatible to gcc.
What happens here to the thread starter is, that he used gcc under windows to build the dll and link it with icc. You can do even that, if you only use C functions. A very short statement can be found at: http://www.cygwin.com/faq/faq.programming.html#faq.programming.msvc-gcc-objects
If you use C++ clases this will probably fail. I think this should also fail linking with the MSVC tools.
Bustaf, are you now agree? If not I will try to build an example and going deeper in this issue.
Thanks,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You made me doubts , i know my memory Is old now...
maybe possible is I mixing....
but i think i have already use in the past.
exist for me an test more simple for verify
See about form :
http://www.scribd.com/doc/40725510/Build-PostgreSQL-C-Functions-on-Windows
also
http://www.postgresql.org/docs/9.0/static/xfunc-c.html
Require i verify with Mingw 32 (function (dll)MINGW AND VC origin added)....
Actual I have (**)DRAGON 64 with W7 64.. i think some lib incomplete to build this task.
Problem also i think to load added function C++ PG engine require backend C++ before...
(Engine PG have only by default C backend)
About your last question
even if I'm wrong ,share with you with your test extended or is new verification test in my side
is with the pleasure,not an challenge. just, must be not detrimental to your time...
To same subject could benefit to other users i add...
Recently I have help an user how to adding C function in PG ubuntu)
is wrote in French but could have interest also for testing with Icc compiler Linux.
http://www.developpez.net/forums/d1096974/bases-donnees/postgresql/procedures-stockees-c-postgresql-8-4-a/
between the end exchange you have the complete described, step by step of this process on Linux Ubuntu.
(**)http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm64-gcc-4.5.2.exe/download
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have find some links on the problem that you have exposed previously for it should explain more clearly
that is possible to make and not make.
But if an blocking property exist, for the part supposed working ,could be
also no always functional some sides,even if you cry !!!
http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs
http://www.mingw.org/wiki/sampleDLL
http://www.transmissionzero.co.uk/computing/advanced-mingw-dll-topics/
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bustaf,
the last link is really interesting. There seems to be a possibility to use a
dll containing C++ code with a different compiler ABI than that which are
created the dll. I hope I will find a little bit of time tomorrow to check
that. It is still on my todo list :-)
The other links are mainly telling you to use a C-style wrapper for this constellation.
Thanks!
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have add the link is first only for could interest all users C || C++.
(also complement relation for adding C function Pg engine side Microsoft)..
Regards
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page