Hi,
I have a header file:
Code:
#ifndef _TX_SERVER_H
#define _TX_SERVER_H
#include<tx-types.h>
#include<nssi_xdr.h>
#include<list>
#include "nssi_server.h"
#define NUMCLIENTS 1
extern tx_info current_push_tx;
extern nssi_service xfer_svc;
extern nssi_remote_pid my_procid;
extern std::list<client_response*> push_respond_list;
extern std::list<client_response*> pull_respond_list;
extern std::list<tx_info*> tx_history_list;
void init_server();
void push_transaction(
const unsigned long request_id,
const nssi_remote_pid *caller,
const push_tx_data *tx,
const nssi_rma *data_addr,
const nssi_rma *res_addr
);
void process_transaction(
tx_info * info, tx_status STATUS
);
#endif
I am able to create the .o files with no problem. but when I can't link... for example, I get the following error...
tx-server.cpp.text+0x1f): undefined reference to `tx_history_list'
I get this for each one of the lists above.
I have a file tx-server.cpp which includes tx-server.h
Here are the calls I make for tx_history_list
Code:
for(list<tx_info*>::iterator it = tx_history_list.begin(); it != tx_history_list.end(); it++)
and in another function
Code:
tx_history_list.push_front(info);
in tx-server.cpp, I do have using namespace std
Is there something I'm missing during the linking? Something specific to which I have to link?
Currently, I am only linking to in-house libraries...
Code:
g++ -Wall -L $HOME/lib -L /ascldap/users/xxxx/lib/ -lcommandlineprocessor -lnx_server -lnx_client -lnx_support -lezxml -o tx-test tx-server.o tx-test.o
I'm extremely new to C/C++, so this is a bit confusing for me.
Thanks for the patience!!