Error In Header File During Compiling

fish_sticks
Posts: 3
Joined: Wed Sep 01, 2010 4:49 pm

Error In Header File During Compiling

Post by fish_sticks »

I got bullet 2.77 beta version installed as I could not run make install of bullet 2.76

But now the problem is that I get an error during compilation of my code.
I'm using Code Blocks.
Here's the log.Thanks in advance.

Code: Select all


-------------- Build: Debug in Nuke ---------------

Linking console executable: bin/Debug/Nuke
obj/Debug/main.o: In function `btAlignedAllocator<int, 16u>::deallocate(int*)':
/usr/local/include/LinearMath/btAlignedAllocator.h:90: undefined reference to `btAlignedFreeInternal(void*)'
obj/Debug/main.o: In function `btAlignedAllocator<btHashInt, 16u>::deallocate(btHashInt*)':
/usr/local/include/LinearMath/btAlignedAllocator.h:90: undefined reference to `btAlignedFreeInternal(void*)'
obj/Debug/main.o: In function `btAlignedAllocator<btTriangleInfo, 16u>::deallocate(btTriangleInfo*)':
/usr/local/include/LinearMath/btAlignedAllocator.h:90: undefined reference to `btAlignedFreeInternal(void*)'
obj/Debug/main.o:(.rodata._ZTV17btTypedConstraint[vtable for btTypedConstraint]+0x60): undefined reference to `btTypedConstraint::serialize(void*, btSerializer*) const'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
4 errors, 0 warnings
 

fish_sticks
Posts: 3
Joined: Wed Sep 01, 2010 4:49 pm

Re: Error In Header File During Compiling

Post by fish_sticks »

can anyone help me out with this?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Error In Header File During Compiling

Post by Erwin Coumans »

It is not a header file issue, but a linker issue.

Make sure to try out the latest Bullet 2.77 beta revision 2189 or later. The default Bullet demos seem to compile, link and run fine using Code::Blocks (generated using cmake). You might want to compare the setup, order of link libraries etc.
Thanks,
Erwin
fish_sticks
Posts: 3
Joined: Wed Sep 01, 2010 4:49 pm

Re: Error In Header File During Compiling

Post by fish_sticks »

I'll try compiling it again with the new version.Will let you know how it turns out.

PS-can you send me links of a few good tutorials?for beginners?
User avatar
Dr.Shepherd
Posts: 168
Joined: Tue Jan 04, 2011 11:47 pm

Re: Error In Header File During Compiling

Post by Dr.Shepherd »

fish_sticks wrote:I'll try compiling it again with the new version.Will let you know how it turns out.

PS-can you send me links of a few good tutorials?for beginners?
Oops, actually there is one on the wiki page, but it is quite limited, I have to say that