OpenQNX :: The QNX Community Portal

May 13, 2008 - 12:16 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 59 unlogged users and 1 registered user online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
ekheyf
11 Post subject: Adding Scramnet Libraries into QNX 6.3 IDE  PostPosted: Mar 28, 2006 - 10:26 PM
New Member


Joined: Mar 28, 2006
Posts: 4

Please help. I have a very simple program that is in QNX C, and I'm having problems linking Scramnet libraries to it. I have one library that I'm trying to include (libhw), and a header file to go with it (scr.h). I've included the include directory, and the library directory in the compiler and linker, but I still get an error. Can anyone shed some light on this?

#include <stdlib.h>
#include <stdio.h>
//#include "scr.h"
#include "temp1.h"

int main(int argc, char *argv[]) {
int temp2;
temp2 = scr_dfltr_mm(5);
temp2 = huinya(1);
printf("%i \n" , temp2);
printf("Welcome to the Momentics IDE\n");
return EXIT_SUCCESS;
}

make -k all --file=/workspace/EugeneProject/QMakefile16265.tmp
make -j 1 -Cx86 -fMakefile all
make[1]: Entering directory `/workspace/EugeneProject/x86'
make -j 1 -Co -fMakefile all
make[2]: Entering directory `/workspace/EugeneProject/x86/o'
/usr/qnx630/host/qnx6/x86//usr/bin/qcc -V3.3.5,gcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I. -I/workspace/EugeneProject/x86/o -I/workspace/EugeneProject/x86 -I/workspace/EugeneProject -I/workspace/EugeneProject/usr/scramnet/inc -I/usr/qnx630/target/qnx6/usr/include /workspace/EugeneProject/EugeneProject.c
/workspace/EugeneProject/EugeneProject.c: In function `main':
/workspace/EugeneProject/EugeneProject.c:10: warning: implicit declaration of function `scr_dfltr_mm'
/bin/rm -f /workspace/EugeneProject/x86/o/EugeneProject
/usr/qnx630/host/qnx6/x86//usr/bin/qcc -V3.3.5,gcc_ntox86 -o/workspace/EugeneProject/x86/o/EugeneProject EugeneProject.o temp1.o -L. -L/usr/scramnet/lib -L/usr/qnx630/target/qnx6/x86/lib/gcc/3.3.5 -L/usr/qnx630/target/qnx6/x86/lib -L/usr/qnx630/target/qnx6/x86/usr/lib -lc -llibhw
/usr/qnx630/host/qnx6/x86//usr/bin/i386-pc-nto-qnx6.3.0-ld: cannot find -llibhw
cc: /usr/qnx630/host/qnx6/x86//usr/bin/i386-pc-nto-qnx6.3.0-ld error 1
make[2]: *** [/workspace/EugeneProject/x86/o/EugeneProject] Error 1
make[2]: Leaving directory `/workspace/EugeneProject/x86/o'
make[2]: Target `all' not remade because of errors.
make[1]: [all] Error 2 (ignored)
make -j 1 -Co-g -fMakefile all
make[2]: Entering directory `/workspace/EugeneProject/x86/o-g'
/usr/qnx630/host/qnx6/x86//usr/bin/qcc -V3.3.5,gcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -I. -I/workspace/EugeneProject/x86/o -I/workspace/EugeneProject/x86/o-g -I/workspace/EugeneProject/x86 -I/workspace/EugeneProject -I/workspace/EugeneProject/usr/scramnet/inc -I/usr/qnx630/target/qnx6/usr/include -g -DVARIANT_g /workspace/EugeneProject/EugeneProject.c
/workspace/EugeneProject/EugeneProject.c: In function `main':
/workspace/EugeneProject/EugeneProject.c:10: warning: implicit declaration of function `scr_dfltr_mm'
/bin/rm -f /workspace/EugeneProject/x86/o-g/EugeneProject_g
/usr/qnx630/host/qnx6/x86//usr/bin/qcc -V3.3.5,gcc_ntox86 -o/workspace/EugeneProject/x86/o-g/EugeneProject_g EugeneProject.o temp1.o -L. -L/usr/scramnet/lib -L/usr/qnx630/target/qnx6/x86/lib/gcc/3.3.5 -L/usr/qnx630/target/qnx6/x86/lib -L/usr/qnx630/target/qnx6/x86/usr/lib -lc -llibhw -g
/usr/qnx630/host/qnx6/x86//usr/bin/i386-pc-nto-qnx6.3.0-ld: cannot find -llibhw
cc: /usr/qnx630/host/qnx6/x86//usr/bin/i386-pc-nto-qnx6.3.0-ld error 1
make[2]: *** [/workspace/EugeneProject/x86/o-g/EugeneProject_g] Error 1
make[2]: Leaving directory `/workspace/EugeneProject/x86/o-g'
make[1]: Leaving directory `/workspace/EugeneProject/x86'
make[2]: Target `all' not remade because of errors.
make[1]: [all] Error 2 (ignored)
 
 View user's profile Send private message  
Reply with quote Back to top
mario
Post subject:   PostPosted: Mar 28, 2006 - 11:54 PM
QNX Master


Joined: Sep 01, 2002
Posts: 2667

/workspace/EugeneProject/EugeneProject.c
/workspace/EugeneProject/EugeneProject.c: In function `main':
/workspace/EugeneProject/EugeneProject.c:10: warning: implicit declaration of function `scr_dfltr_mm'

I suspect you are not including the header #include <> in the C file. Or that perticular function has a typo.

As for the library, try specifying -lhw instead of -llibhw.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
ekheyf
Post subject:   PostPosted: Mar 29, 2006 - 03:14 PM
New Member


Joined: Mar 28, 2006
Posts: 4

Thanks. I've checked the include file and it is there. I will try -lhw, however the library name is libhw. Thanks again for looking at this
 
 View user's profile Send private message  
Reply with quote Back to top
mario
Post subject:   PostPosted: Mar 29, 2006 - 06:00 PM
QNX Master


Joined: Sep 01, 2002
Posts: 2667

the library name should be libhw.a. the *cc front end will add lib prefix and .a suffix (I have not idea what is the rationnal behind this)

In the header file add a #error hello just beside the prototype of the fonction. If when compiling you are not getting any error it's because for some reason that header file is not included or some portion of it are commented or ifdefed out.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
rgallen
Post subject:   PostPosted: Mar 29, 2006 - 06:45 PM
QNX Master


Joined: Jul 11, 2002
Posts: 557

mario wrote:
the library name should be libhw.a. the *cc front end will add lib prefix and .a suffix (I have not idea what is the rationnal behind this)


Because it's kool! (that's the best I can come up with anyway Smile
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
ekheyf
Post subject:   PostPosted: Mar 29, 2006 - 07:11 PM
New Member


Joined: Mar 28, 2006
Posts: 4

Thanks. That did include the library files. Its the weardest thing I've ever seen. For some reason I'm still getting errors inside the library files. Thanks for your help mario.
 
 View user's profile Send private message  
Reply with quote Back to top
mario
Post subject:   PostPosted: Mar 29, 2006 - 10:19 PM
QNX Master


Joined: Sep 01, 2002
Posts: 2667

ekheyf wrote:
Its the weardest thing I've ever seen.


You must be very young then ;-)
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
ekheyf
Post subject:   PostPosted: Mar 30, 2006 - 03:01 PM
New Member


Joined: Mar 28, 2006
Posts: 4

True
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.