I am getting an Unsatisfied symbols error. Can one of the more experienced members please shed some light on what I am doing wrong and what I need to do to fix it.
Build Error:
Code:
# PROJECT ioconfig_info
# Building Target: iomain
# ENV vars set: COMPFLAGS_LD_iomain=-g0 , COMPFLAGS_CXX_iomain=-g0 -O -y
aCC -c -g0 -O -y -o iomain.o iomain.cc
aCC: current directory is "/build/nitro_project/ioconfig-info"
Linking iomain ...
aCC -g0 -o iomain iomain.o
aCC: current directory is "/build/nitro_project/ioconfig-info"
/usr/ccs/bin/ld: Unsatisfied symbols:
io_search (first referenced in iomain.o) (code)
*** Error exit code 1
Stop.
Non-Zero status from child process.
# PROJECT ioconfig_info BUILD-TARGET Failed
Stripped Down iomain.cc:
Code:
#include <cstdlib>
#include <iostream.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef __cplusplus
#define class ioclass
extern "C" {
//#endif
#include "/usr/include/sys/ioparams.h"
//#ifdef __cplusplus
void *io_search __( ( void *token, int type, int qual, ...) );
void *io_search_array __( ( void *token, int type, int qual, char *key[], void *dat[] ) );
int io_query __( ( void *token, int type, char *key, void *ptr ) );
int io_get_key_info __( ( int type, char *key, char *type_name, int *size ) );
};
#endif
int main( void ) {
void *token;
token = NULL;
token = io_search (token, S_IOTREE, Q_HW, "class", "disk", NULL );
// more code here ...
exit ( 0 );
}
Snip-it from ioparams.h
Code:
...
#ifdef _KERNEL
/* External function prototype declarations */
extern void *io_search __( ( void *token, int type, int qual, ... ) );
extern void *io_search_array __( ( void *token, int type, int qual, char *key[], void *dat[] ) );
extern int io_query __( ( void *token, int type, char *key, void *ptr ) );
extern int io_get_key_info __( ( int type, char *key, char *type_name, int *size ) );
#endif /* _KERNEL */
Am I defining the external functions in iomain.cc correctly or am I just calling them wrong?
Thanks In Advance For Any And All Help,
DeadPoet