hi all
I am getting the following error when i try to compile a source file:
/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:57: undefined
reference to `vtkUnstructure dGrid::InsertNe xtCell(int, vtkIdList*)'
collect2: ld returned 1 exit status
I have double checked that:
1.the .h and .cxx files i have for InsertNextCell exist and their
definiton of InsertNextCell is the same with the one I am calling
2. I have double checked that I include the .h file with the correct
path in the project options (I use KDevelop)
I dont know what is wrong
I would be greatfull for any help
thanks
Christos Panagiotou 4 7126
"christos panagiotou" <cp******@cs.uc l.ac.uk> wrote... I am getting the following error when i try to compile a source file:
/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:57: undefined reference to `vtkUnstructure dGrid::InsertNe xtCell(int, vtkIdList*)' collect2: ld returned 1 exit status
I have double checked that: 1.the .h and .cxx files i have for InsertNextCell exist and their definiton of InsertNextCell is the same with the one I am calling
2. I have double checked that I include the .h file with the correct path in the project options (I use KDevelop)
I dont know what is wrong
The most probable cause for this error is that you forget
to add the file that contains the InsertNextCell function
to the final program. How to do that is governed by the
compiler command-line options and switches and not by the
language rules. Since you seem to be using G++, you should
probably ask in gnu.g++.help how to set up your project.
Victor
christos panagiotou <cp******@cs.uc l.ac.uk> wrote in message
news:bd******** **@news8.svr.po l.co.uk... hi all
I am getting the following error when i try to compile a source file:
/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:57: undefined reference to `vtkUnstructure dGrid::InsertNe xtCell(int, vtkIdList*)' collect2: ld returned 1 exit status
I have double checked that: 1.the .h and .cxx files i have for InsertNextCell exist and their definiton of InsertNextCell is the same with the one I am calling
2. I have double checked that I include the .h file with the correct path in the project options (I use KDevelop)
I dont know what is wrong I would be greatfull for any help
So, you are convinced that the definition is there, and your compiler is
convinced that it isn't. How can anyone here possibly help without any
samples of code?
Try moving the function "vtkUnstructure dGrid::InsertNe xtCell(int,
vtkIdList*)" from where it is to main.cpp, and see what happens. If the
error goes away then clearly your compiler is not coming across the function
in the other file. This could be because the code is excluded by an #ifdef
or the like, or because you are not including the file, despite your
certainty that you are.
David
"christos panagiotou" <cp******@cs.uc l.ac.uk> wrote in message
news:bd******** **@news8.svr.po l.co.uk... hi all
I am getting the following error when i try to compile a source file:
/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:57: undefined reference to `vtkUnstructure dGrid::InsertNe xtCell(int, vtkIdList*)' collect2: ld returned 1 exit status
I have double checked that: 1.the .h and .cxx files i have for InsertNextCell exist and their definiton of InsertNextCell is the same with the one I am calling
2. I have double checked that I include the .h file with the correct path in the project options (I use KDevelop)
I dont know what is wrong I would be greatfull for any help thanks Christos Panagiotou
Did you add the paths to the vtk libraries to your project? The linker
doesn't know where to find vtkUnstructured Grid::InsertNex tCall and complains
about it. Thus I assume that you forgot to set the library paths.
HTH
Chris
christos panagiotou wrote: hi all
I am getting the following error when i try to compile a source file:
/home/christos/VIVE02/project/asm_3d/asm_3d/main.cpp:57: undefined reference to `vtkUnstructure dGrid::InsertNe xtCell(int, vtkIdList*)' collect2: ld returned 1 exit status
I have double checked that: 1.the .h and .cxx files i have for InsertNextCell exist and their definiton of InsertNextCell is the same with the one I am calling
2. I have double checked that I include the .h file with the correct path in the project options (I use KDevelop)
I dont know what is wrong I would be greatfull for any help thanks Christos Panagiotou
A problem that can occur with gcc is if you accidentally moved the body
of the function from the .h where you typed it initially to the .cpp
where it finally is. If you forget a leading "inline", the linker won't
find the function.
ex:
//file a.h
//------
struct A
{
void doIt() const;
}
//file a.cpp
//------
inline void A::doIt() const // Ah! The inline is the culprit!
{
cout<<"done!\n" ;
}
//file main.C
//----------
#include "a.h"
#include <iostream>
using namespace std;
int
main(int,char** )
{
A a;
a.doIt();
return 0;
}
The aboce example won't link on gcc3.3
--
+-------------------------------------------------+
| Xavier Décoret - Post Doct |
| Graphics Lab (LCS) - MIT |
| mailto: de*****@graphic s.lcs.mit.edu |
| home : http://www.graphics.lc s.mit.edu/~decoret|
+-------------------------------------------------+ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: paul calvert |
last post by:
I hope somewhere here has encountered and solved a similar problem in
the past.
1) on a new Win2000 PC:
installed Visual C++ 6.0
download & install single file Service Pack 5.0
2) try to build my gui and dll projects, whose project, workspace,
source files all resided on network drive mapped to H. The H mapping,
|
by: Mike Fisher |
last post by:
I'm seeing an error when I try to run/debug a web
service. Although it doesn't happen every time, it does
occur more than half of the times I hit F5. It appears
to be returned by the the JIT compiler as the page is
requested by the browser. The result is that
the "compiler failed with error code 2000". I have
tested the same code on...
|
by: Bjorn |
last post by:
I'm using interfaces in C++ by declaring classes with only pure virtual
methods. If then someone wants to implement the interface they
needs to inherit from the class. If the implementing class forgets to
implement some method I normally get a compile error(if the class is created
in some way of course). When using the Visual
Studio 6...
|
by: Mary |
last post by:
Hello,
I am having a problem with the cl compiler. I have written a C class
(RegConnect.c) which uses Win32 API functions such as RegOpenKey,
RegCloseKey etc. Initially when I was trying to create a dll, using
the cl compiler I was getting many unresolved external errors, Example
1 below (8 in total, 7 to do with the registry function...
|
by: rollasoc |
last post by:
Hi,
I seem to be getting a compiler error
Internal Compiler Error (0xc0000005 at address 535DB439): likely culprit is
'BIND'.
An internal error has occurred in the compiler. To work around this problem,
try simplifying or changing the program near the locations listed below.
Locations at the top of the list are closer to the point at...
| |
by: Ayende Rahien |
last post by:
reparing resources...
Updating references...
Performing main compilation...
error CS0583: Internal Compiler Error (0xc0000005 at address 53168B12):
likely culprit is 'BIND'.
An internal error has occurred in the compiler. To work around this problem,
|
by: Mark Rockman |
last post by:
------ Build started: Project: USDAver2, Configuration: Debug .NET ------
Preparing resources...
Updating references...
Performing main compilation...
error CS0583: Internal Compiler Error (0xc0000005 at address 535F072A): likely culprit is 'BIND'.
An internal error has occurred in the compiler. To work around this problem, try...
|
by: David Sworder |
last post by:
Consider the following line of code (it's not important what it does):
resp.DocItem=Relations.SelectDocItems_BySearchString(req.SearchPhrase);
It turns out that this line is in error. The property 'DocItem' should be
'DocItems.' The problem is that instead of notifying me of where the problem
has occurred, the compiler just crashes with an...
|
by: David Lack |
last post by:
Hi,
I recently installed a 60-day trial of .NET 2003 on my development system.
I made tests with previous personal projects (which compiled ok with VC6)
and some open source files, and keep facing the same problem with many
of them:
I keep getting errors such as:
....\WinUser.h(8028): fatal error C1001: INTERNAL COMPILER ERROR
(compiler...
|
by: Dave |
last post by:
I'm having a hard time tying to build gcc 4.3.1 on Solaris using the GNU
compilers. I then decided to try to use Sun's compiler. The Sun Studio
12 compiler reports the following code, which is in the source
(gcc-4.3.1/gcc/c-common.c) of gcc 4.3.1, is a syntax error.
I'm inclined to agree, as it is like no C I have ever met.
what is ...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |