Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: mav on October 25, 2012, 04:44:26 pm
-
I'm using:
Code::Blocks 10.05
GNU GCC Compiler (MinGW)
Windows 7 (64bit)
I want to try out the BasicDemo of the Bullet physics library, using Code::Blocks. To my understanding, there are no library files in the Bullet distribution package. Only cpp-files and h-files. There are no detailed C::B instructions for Bullet available in the web, and I failed with all the undetailed instructions I could find.
So I decided to start from scratch, and created a new C::B project into the folder BasicDemo, and added the four source files to the project. I also added the following to the Project Build Options:
Compiler settings -> #defines:
_WINDOWS
Search directories:
..\OpenGL
..\..\src
When I try to build, I get dozens of "undefined reference to" errors. I suppose these are often related to linking a library, but in this case there are no lib-files or such to link to. Only source files. The first 10 errors are below. One could read from the first error, that there is a reference to btAlignedAllocInternal in the source file Win32BasicDemo.cpp, but actually there is not. Can someone help me out?
obj\Release\Win32BasicDemo.o:Win32BasicDemo.cpp|| undefined reference to `btAlignedAllocInternal(unsigned int, int)'|
obj\Release\Win32BasicDemo.o:Win32BasicDemo.cpp|| undefined reference to `DemoApplication::DemoApplication()'|
obj\Release\Win32BasicDemo.o:Win32BasicDemo.cpp|| undefined reference to `btAlignedFreeInternal(void*)'|
obj\Release\main.o:main.cpp:(.text$_ZN17btTypedConstraintD0Ev[btTypedConstraint::~btTypedConstraint()]+0xb)||undefined reference to `btAlignedFreeInternal(void*)'|
obj\Release\main.o:main.cpp:(.text$_ZN9BasicDemoD1Ev[BasicDemo::~BasicDemo()]+0x5a)||undefined reference to `vtable for Win32DemoApplication'|
obj\Release\main.o:main.cpp:(.text$_ZN9BasicDemoD1Ev[BasicDemo::~BasicDemo()]+0x70)||undefined reference to `btAlignedFreeInternal(void*)'|
obj\Release\main.o:main.cpp:(.text$_ZN9BasicDemoD1Ev[BasicDemo::~BasicDemo()]+0x78)||undefined reference to `vtable for Win32DemoApplication'|
obj\Release\main.o:main.cpp:(.text$_ZN9BasicDemoD1Ev[BasicDemo::~BasicDemo()]+0x84)||undefined reference to `DemoApplication::~DemoApplication()'|
obj\Release\main.o:main.cpp:(.text$_ZN9BasicDemoD1Ev[BasicDemo::~BasicDemo()]+0xaf)||undefined reference to `btAlignedFreeInternal(void*)'|
obj\Release\main.o:main.cpp:(.text$_ZN9BasicDemoD1Ev[BasicDemo::~BasicDemo()]+0x67)||undefined reference to `DemoApplication::~DemoApplication()'|
-
Not a Code::Blocks problem; Off topic on this website.
I suggest turning on full compiler logging and linking to the needed libraries.
If problem still exists ask on a site that supports the Libraries or programing questions.
Log directions.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)
Name of likely libraries
http://www.ogre3d.org/forums/viewtopic.php?f=5&t=46856&start=50#p334038 (http://www.ogre3d.org/forums/viewtopic.php?f=5&t=46856&start=50#p334038)
Tim S.
-
I'm not saying there's a problem in Code::Blocks. I was hoping another Code::Blocks user has tried Bullet, or if not, could still say something about compiling this type of a library. I believe the problem is about how to set up the compiler options correctly in Code::Blocks.
Based on what I read in Bullet forums, help may not be easy to get there, because they do not support Code::Blocks.
-
I'm not saying there's a problem in Code::Blocks. I was hoping another Code::Blocks user has tried Bullet, or if not, could still say something about compiling this type of a library. I believe the problem is about how to set up the compiler options correctly in Code::Blocks.
Based on what I read in Bullet forums, help may not be easy to get there, because they do not support Code::Blocks.
Read the FAQs!!
They DO NOT need to support Code::Blocks to help you with the Compiler.
You do NEED to know the basic of using your compiler.
Find out what Compiler/Linker option you are missing!
If you can not figure out how to add the option in Code::Blocks ask here at Code::Blocks.
Asking us here to figure what option is needed is a waste of bandwidth and violates this site rules that you agreed to follow.
Tim S.