logo

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Ajith Kumar  
#1 Posted : Monday, May 25, 2015 6:28:18 AM(UTC)
Ajith Kumar

Rank: Member

Joined: 5/11/2015(UTC)
Posts: 12

Was thanked: 4 time(s) in 4 post(s)
Hi,

I tried to configure as per the guide lines provided in the API.Guide

This is the sample program as shown below:

Program:
#include <iostream>

using namespace std;

int main() {
cout << "!!!***Hello World UA SDK ***!!!" << endl; // prints !!!***Hello World UA SDK ***!!!
return 0;
}

When I try to build project I am getting the following errors. The errors are mentioned as shown below.

Problems:
cannot find -lClientSdk test1
cannot find -lStackWrapper
cannot find -lGeneralSdk
make: *** [test1] Error 1
skipping incompatible /home/rv00343930/MatrikonOPC_UASDK_Linux/UA_SDK/Lib/libClientSdk.so when searching for -lClientSdk
skipping incompatible /home/rv00343930/MatrikonOPC_UASDK_Linux/UA_SDK/Lib/libStackWrapper.so when searching for -lStackWrapper
skipping incompatible /home/rv00343930/MatrikonOPC_UASDK_Linux/UA_SDK/Lib/libGeneralSdk.so when searching for -lGeneralSdk

I have given the test1 path as /home/rv00343930/Documents/test1.

Please kindly suggest me on how to resolve these errors.

Regards,
Ajith

Edited by user Monday, May 25, 2015 6:28:49 AM(UTC)  | Reason: Not specified

Offline Patrick Griffiths  
#2 Posted : Monday, May 25, 2015 8:54:31 AM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
What is the output of uname -a ?

Patrick
Offline Ajith Kumar  
#3 Posted : Monday, May 25, 2015 5:48:47 PM(UTC)
Ajith Kumar

Rank: Member

Joined: 5/11/2015(UTC)
Posts: 12

Was thanked: 4 time(s) in 4 post(s)
O/P of uname -a is shown below:

Linux rv00343930-OptiPlex-210L 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Regards,
Ajith
thanks 1 user thanked Ajith Kumar for this useful post.
Offline Patrick Griffiths  
#4 Posted : Tuesday, May 26, 2015 6:45:30 AM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
Ok, I see you are using an x86_64 (64 bit) install. The SDK libraries are x86 (32 bit). You can either switch to a 32 bit version of Linux (recommended) or you can take advantage of multiarch, install x86 versions of the required libraries (including devel pacakages) and add -m32 to the command line when you build.

Teaching you how to cross compile is beyond the scope of what I can do on the forum, but if you google building 32 bit binaries on 64 bit Linux with gcc, there's lots of information. We've also tested it here, so we know it works.

Good luck.
Patrick
Offline Ajith Kumar  
#5 Posted : Tuesday, May 26, 2015 7:12:27 AM(UTC)
Ajith Kumar

Rank: Member

Joined: 5/11/2015(UTC)
Posts: 12

Was thanked: 4 time(s) in 4 post(s)
Hi Patrick,

Thank you for the reply.

Should I include -m32 Under C/C++ Build select Settings > Tool Settings > Cross G++ Linker > Miscellaneous enter the following flag:
-wl,-m32,-rpath,'$$origin'

Please correct me if I am wrong.

Regards,
Ajith
thanks 1 user thanked Ajith Kumar for this useful post.
Offline Patrick Griffiths  
#6 Posted : Wednesday, May 27, 2015 7:36:32 AM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
Ajith, I don't remember the exact place in the GUI, but you need to specify it for both the compiler and the linker.

Patrick
Offline Ajith Kumar  
#7 Posted : Thursday, May 28, 2015 2:26:00 AM(UTC)
Ajith Kumar

Rank: Member

Joined: 5/11/2015(UTC)
Posts: 12

Was thanked: 4 time(s) in 4 post(s)
Hi Patrick,

I have followed the following steps as shown below as I am using 64bit linux ubuntu 14.04 system.

a) sudo apt-get install libc6:i386

b) cd /etc/apt/sources.list.d

c) echo "deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list

d) apt-get update

e) apt-get install ia32-libs

f) rm /etc/apt/sources.list.d/ia32-libs-raring.list

g) apt-get update

h) sudo apt-get install gcc-multilib

and then I have give -m32 after gcc.

but still I am getting the same error as:

cannot find -lClientSdk
cannot find -lStackWrapper
cannot find -lGeneralSdk

I even copied .so libraries in to Debug folder.

Please help me to resolve the error.

Regards,
Ajith
Offline Ajith Kumar  
#8 Posted : Tuesday, June 2, 2015 10:20:46 PM(UTC)
Ajith Kumar

Rank: Member

Joined: 5/11/2015(UTC)
Posts: 12

Was thanked: 4 time(s) in 4 post(s)
Any suggestion regarding the above error??
Offline Patrick Griffiths  
#9 Posted : Wednesday, June 3, 2015 8:44:36 AM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
Ajith, please do not multi-post the same question to multiple threads on the forum. It makes it harder for us to track which questions have been answered and which have not. We do our best to get to everyone's questions as quickly as we can, but resources (especially time) are extremely limited.

Thanks for you understanding.
Patrick
Offline Roberto Dias  
#10 Posted : Monday, June 8, 2015 12:31:47 PM(UTC)
Roberto Dias

Rank: Member

Joined: 4/15/2015(UTC)
Posts: 12
Location: Florianópolis

Was thanked: 5 time(s) in 5 post(s)
Dear Ajith,

I post in my postdoctoral Blog (logbook) a post (in portuguese) about Eclipse Luna C/C++ IDE ARMv7 Cross Compilation.

See in the link bellow:

http://posdocrad.blogspo...do-aplicacao-opc-ua.html
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Matrikon Subscribe  |   Matrikon Unsubscribe  |   Global Unsubscribe  |   Privacy Statement  |   Your Privacy Choices   |   Cookie Notice