Linking problems with c++ egcs 1.0.2-8
Rolf Schneider
rolf@sci-d-vis.com
Mon Jul 13 08:40:00 GMT 1998
--
S c i e n c e . D . V i s i o n s
Emil-Figge Str. 80 D-44227 Dortmund Germany
Phone: ++ 49 231 9742 188 Fax: ++ 49 231 9742 189
mailto:info@sci-d-vis.com http://www.sci-d-vis.com
Hello.
I'm currently trying to port an application from SGI to linux. The c++
files for this application are generated under SGI using the rapidapp
GUI builder.
I currently have a standard RedHat 5.1 Linux including the c++ egcs
1.0.2 on my system.
The application compiles fine. However during linking, I get these error
messages:
g++ main.o FormClass.o FormClassUI.o SimpleWindowClass.o
unimplemented.o -o linux_tst -L/usr/X11/lib
-L/home/devel/Mesa-3.0/lib -lX11 -lXpm -lXext -lXmu -lXm -lXt -lXi -lXp
-lSM -lICE -ldl -lvk -lvkhelp -lGLw -lGL -lGLU
FormClassUI.o: In function `FormClassUI type_info function':
/home/devel/rolf_tests/rap_test2/FormClassUI.C:403: undefined reference
to `VkComponent type_info function'
/home/devel/rolf_tests/rap_test2/FormClassUI.C:403: undefined reference
to `VkComponent type_info node'
SimpleWindowClass.o: In function `SimpleWindowClass type_info function':
/home/devel/rolf_tests/rap_test2/SimpleWindowClass.C:147: undefined
reference to `VkSimpleWindow type_info function'
/home/devel/rolf_tests/rap_test2/SimpleWindowClass.C:147: undefined
reference to `VkSimpleWindow type_info node'
I have included 2 code fragments at the end of this email.
Does anybody know, what's going on here ?
Thanks for your help!
Rolf
-------------------8<-------------------------
SimpleWindowClass.C:
====================
------------------------------------start
#include "SimpleWindowClass.h"
#include <Vk/VkApp.h>
#include <Vk/VkResource.h>
// Externally defined classes referenced by this class:
#include "FormClass.h"
extern void VkUnimplemented ( Widget, const char * );
//---- Start editable code block: headers and declarations
//---- End editable code block: headers and declarations
// These are default resources for widgets in objects of this class
// All resources will be prepended by *<name> at instantiation,
// where <name> is the name of the specific instance, as well as the
// name of the baseWidget. These are only defaults, and may be overriden
// in a resource file by providing a more specific resource name
String SimpleWindowClass::_defaultSimpleWindowClassResources[] = {
//---- Start editable code block: SimpleWindowClass Default
Resources
//---- End editable code block: SimpleWindowClass Default
Resources
(char*)NULL
};
//---- Class declaration
SimpleWindowClass::SimpleWindowClass ( const char *name,
ArgList args,
Cardinal argCount) :
VkSimpleWindow ( name, args, argCount )
{
// Load any class-default resources for this object
setDefaultResources ( baseWidget(),
_defaultSimpleWindowClassResources );
// Create the view component contained by this window
_formClass = new FormClass ( "formClass",mainWindowWidget() );
XtVaSetValues ( _formClass->baseWidget(),
XmNwidth, 509,
XmNheight, 558,
(XtPointer) NULL );
// Add the component as the main view
addView ( _formClass );
//---- Start editable code block: SimpleWindowClass constructor
//---- End editable code block: SimpleWindowClass constructor
} // End Constructor
SimpleWindowClass::~SimpleWindowClass()
{
delete _formClass;
//---- Start editable code block: SimpleWindowClass destructor
//---- End editable code block: SimpleWindowClass destructor
} // End destructor
const char *SimpleWindowClass::className()
{
return ("SimpleWindowClass");
} // End className()
Boolean SimpleWindowClass::okToQuit()
{
//---- Start editable code block: SimpleWindowClass okToQuit
// This member function is called when the user quits by calling
// theApplication->terminate() or uses the window manager close
protocol
// This function can abort the operation by returning FALSE, or do
some.
// cleanup before returning TRUE. The actual decision is normally
passed on
// to the view object
// Query the view object, and give it a chance to cleanup
return ( _formClass->okToQuit() );
//---- End editable code block: SimpleWindowClass okToQuit
} // End okToQuit()
-----------------------end
SimpleWindowClass.h:
====================
-----------------------start
#ifndef SIMPLEWINDOWCLASS_H
#define SIMPLEWINDOWCLASS_H
#include <Vk/VkSimpleWindow.h>
//---- Start editable code block: headers and declarations
//---- End editable code block: headers and declarations
//---- SimpleWindowClass class declaration
class SimpleWindowClass: public VkSimpleWindow {
public:
SimpleWindowClass( const char * name,
ArgList args = NULL,
Cardinal argCount = 0 );
~SimpleWindowClass();
const char *className();
virtual Boolean okToQuit();
//---- Start editable code block: SimpleWindowClass public
//---- End editable code block: SimpleWindowClass public
protected:
// Classes created by this class
class FormClass *_formClass;
// Widgets created by this class
//---- Start editable code block: SimpleWindowClass protected
//---- End editable code block: SimpleWindowClass protected
private:
static String _defaultSimpleWindowClassResources[];
//---- Start editable code block: SimpleWindowClass private
//---- End editable code block: SimpleWindowClass private
};
//---- Start editable code block: End of generated code
//---- End editable code block: End of generated code
#endif
---------------------end
More information about the Gcc
mailing list