29 Nov 2018 02:13 AM - last edited on 10 Dec 2021 07:19 AM by MaciejNeumann
When I compile and linkage my test program with Open SDK for C, I encounter linkage error of onesdk_xxx() and I don't have any ideas why the error happens. Is there any advice to address the rror.
Solved! Go to Solution.
03 Dec 2018 10:27 AM
Hello,
There could be two reasons for this error: First, even if you use 64 Bit Windows, the compiler could default to 32 bit. You can try if linking succeeds when using the windows-x86_32 library directory.
Second, the reason could be that you use gcc on Windows, which we do not really support.
EDIT: Also, do not link both onesdk_shared and onesdk_static but only one of them (preferably only onesdk_static).
04 Dec 2018 08:57 AM
Hello Christian,
>Second, the reason could be that you use gcc on Windows, which we do not really support.
Is this mean Open SDK for C windows library compiled by C++(g++)?
04 Dec 2018 09:21 AM
Hello,
First, this is not called Open SDK but OneAgent SDK for C/C++ (sorry for being nitpicky, but we have to be careful here to avoid confusion with similarly named APIs). (EDIT: I see now that this was already in the title, I just noticed it now)
And no, the SDK binaries provided are not compiled with g++. For Windows, they are compiled with the Microsoft Visual Studio C/C++ Compiler ("MSVC") in C mode. For Linux, they are indeed compiled with gcc. These are also the only combinations the SDK is tested with. Using the SDK with gcc on Windows (with the correct 32 or 64 bit library) may happen to work but is not supported.
06 Dec 2018 02:39 AM
Hello,
I have understood about what compiler is used.
Thank you for the information.