[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dlopen -> no references from host
Hi,
to make clear what I mean:
	- test.hh --------
	extern "C" {
	#ifdef HOST
	  void sendmsg (string msg);
	#else
	  extern void sendmsg (string msg);
	#endif
	}
	- host.cc --------
	#define HOST
	#include "test.hh"
	main()
	{
	// dlopen, etc.
	  (*client_init) ();
	}
	void sendmsg (string msg)
	{
	  cout << msg << endl;
	}
	- client.cc -------
	#include "test.hh"
	client_init()
	{
	  sendmsg ("test OK");
	}
	--------------------
Now dlopen() says: 'undefined reference 'int sendmsg (string)' o.s. .
In all: How can I make 'client.cc' using the reference of its host?
bye
Felix Kollmann, DG5PT
Future Interactive 
email: fkollmann@gmx.net
http://www.futureint.com
----
Don't fear the future, because fear is the path to the dark side.
Fear is to angry. Angry is to hate and hate is to suffering.
-- Yoda