Sign in to follow this  

codeblocks IDE link error

This topic is 3843 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im trying to port some code to linux, and my IDE is code blocks. I've got a link error:
Linking console executable: bin/Debug/TestInstance
/usr/bin/ld: skipping incompatible /usr/lib/libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible /usr/lib/libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
../../Library/Render/libRender.a(Camera.o): In function `Camera::Load(ObjectLoadParams const*, SceneNode*)':
/home/bronson/workspace/Library/Render/Camera.cpp:32: undefined reference to `File::Read(void*, unsigned int) const'
/home/bronson/workspace/Library/Render/Camera.cpp:33: undefined reference to `File::Read(void*, unsigned int) const'
/home/bronson/workspace/Library/Render/Camera.cpp:34: undefined reference to `File::Read(void*, unsigned int) const'
/home/bronson/workspace/Library/Render/Camera.cpp:35: undefined reference to `File::Read(void*, unsigned int) const'
/home/bronson/workspace/Library/Render/Camera.cpp:36: undefined reference to `File::Read(void*, unsigned int) const'
../../Library/Render/libRender.a(Camera.o): In function `Camera::Save(File const&, SceneNode*)':
/home/bronson/workspace/Library/Render/Camera.cpp:19: undefined reference to `File::Write(void const*, unsigned int) const'
/home/bronson/workspace/Library/Render/Camera.cpp:20: undefined reference to `File::Write(void const*, unsigned int) const'
/home/bronson/workspace/Library/Render/Camera.cpp:21: undefined reference to `File::Write(void const*, unsigned int) const'
/home/bronson/workspace/Library/Render/Camera.cpp:22: undefined reference to `File::Write(void const*, unsigned int) const'
/home/bronson/workspace/Library/Render/Camera.cpp:23: undefined reference to `File::Write(void const*, unsigned int) const'
../../Library/Render/libRender.a(RenderFactory.o): In function `RenderFactory::Load(int, ObjectLoadParams const*)':
/home/bronson/workspace/Library/Render/RenderFactory.cpp:111: undefined reference to `File::GetPosition() const'
/home/bronson/workspace/Library/Render/RenderFactory.cpp:150: undefined reference to `File::Seek(long, File::SeekType)'
../../Library/Render/libRender.a(RenderFactory.o): In function `RenderFactoryParameter::GetExistingFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const':
/home/bronson/workspace/Library/Render/RenderFactory.cpp:28: undefined reference to `File::File()'
/home/bronson/workspace/Library/Render/RenderFactory.cpp:29: undefined reference to `File::Open(char const*, char const*)'
/home/bronson/workspace/Library/Render/RenderFactory.cpp:33: undefined reference to `File::Open(char const*, char const*)'
/home/bronson/workspace/Library/Render/RenderFactory.cpp:37: undefined reference to `File::Open(char const*, char const*)'
/home/bronson/workspace/Library/Render/RenderFactory.cpp:41: undefined reference to `File::Open(char const*, char const*)'
/home/bronson/workspace/Library/Render/RenderFactory.cpp:46: undefined reference to `File::Open(char const*, char const*)'
../../Library/Render/libRender.a(RenderFactory.o):/home/bronson/workspace/Library/Render/RenderFactory.cpp:50: more undefined references to `File::Open(char const*, char const*)' follow
../../Library/Render/libRender.a(RenderFactory.o): In function `RenderFactoryParameter::GetExistingFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const':
/home/bronson/workspace/Library/Render/RenderFactory.cpp:59: undefined reference to `File::~File()'
/home/bronson/workspace/Library/Render/RenderFactory.cpp:59: undefined reference to `File::~File()'
../../Library/Render/libRender.a(Scene.o): In function `Scene::Save(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/bronson/workspace/Library/Render/Scene.cpp:48: undefined reference to `File::File(char const*, char const*)'
/home/bronson/workspace/Library/Render/Scene.cpp:49: undefined reference to `File::~File()'
/home/bronson/workspace/Library/Render/Scene.cpp:49: undefined reference to `File::~File()'
../../Library/Render/libRender.a(Scene.o): In function `Scene::Load(ObjectLoadParams*)':
/home/bronson/workspace/Library/Render/Scene.cpp:38: undefined reference to `File::File(char const*, char const*)'
/home/bronson/workspace/Library/Render/Scene.cpp:39: undefined reference to `File::Valid() const'
/home/bronson/workspace/Library/Render/Scene.cpp:43: undefined reference to `File::~File()'
/home/bronson/workspace/Library/Render/Scene.cpp:43: undefined reference to `File::~File()'
../../Library/Render/libRender.a(SceneObject.o): In function `SceneNode::Save(File&)':
/home/bronson/workspace/Library/Render/SceneObject.cpp:150: undefined reference to `File::Write(void const*, unsigned int) const'
/home/bronson/workspace/Library/Render/SceneObject.cpp:151: undefined reference to `File::Write(void const*, unsigned int) const'
/home/bronson/workspace/Library/Render/SceneObject.cpp:154: undefined reference to `File::Write(void const*, unsigned int) const'
/home/bronson/workspace/Library/Render/SceneObject.cpp:157: undefined reference to `File::Write(void const*, unsigned int) const'
/home/bronson/workspace/Library/Render/SceneObject.cpp:161: undefined reference to `File::Write(void const*, unsigned int) const'
../../Library/Render/libRender.a(SceneObject.o):/home/bronson/workspace/Library/Render/SceneObject.cpp:170: more undefined references to `File::Write(void const*, unsigned int) const' follow
../../Library/Render/libRender.a(SceneObject.o): In function `SceneNode::Load(ObjectLoadParams*, Scene*)':
/home/bronson/workspace/Library/Render/SceneObject.cpp:66: undefined reference to `File::Read(void*, unsigned int) const'
/home/bronson/workspace/Library/Render/SceneObject.cpp:67: undefined reference to `File::Read(void*, unsigned int) const'
/home/bronson/workspace/Library/Render/SceneObject.cpp:72: undefined reference to `File::Read(void*, unsigned int) const'
/home/bronson/workspace/Library/Render/SceneObject.cpp:75: undefined reference to `File::Read(void*, unsigned int) const'
/home/bronson/workspace/Library/Render/SceneObject.cpp:80: undefined reference to `File::Read(void*, unsigned int) const'
../../Library/Render/libRender.a(SceneObject.o):/home/bronson/workspace/Library/Render/SceneObject.cpp:89: more undefined references to `File::Read(void*, unsigned int) const' follow
../../Library/Render/libRender.a(Shape.o): In function `Shape::Save(File const&, SceneNode*)':
/home/bronson/workspace/Library/Render/Shape.cpp:6: undefined reference to `File::Write(void const*, unsigned int) const'
/home/bronson/workspace/Library/Render/Shape.cpp:7: undefined reference to `File::Write(void const*, unsigned int) const'
../../Library/Render/libRender.a(Spline.o): In function `Spline::Load(ObjectLoadParams const*, SceneNode*)':
/home/bronson/workspace/Library/Render/Spline.cpp:37: undefined reference to `File::Read(void*, unsigned int) const'
/home/bronson/workspace/Library/Render/Spline.cpp:47: undefined reference to `File::Read(void*, unsigned int) const'
/home/bronson/workspace/Library/Render/Spline.cpp:52: undefined reference to `File::Read(void*, unsigned int) const'
../../Library/Render/libRender.a(Spline.o): In function `Spline::Save(File const&, SceneNode*)':
/home/bronson/workspace/Library/Render/Spline.cpp:13: undefined reference to `File::Write(void const*, unsigned int) const'
/home/bronson/workspace/Library/Render/Spline.cpp:21: undefined reference to `File::Write(void const*, unsigned int) const'
/home/bronson/workspace/Library/Render/Spline.cpp:24: undefined reference to `File::Write(void const*, unsigned int) const'
../../Library/Render/libRender.a(Control.o): In function `Controller::Save(File const&)':
/home/bronson/workspace/Library/Render/Control.cpp:329: undefined reference to `File::Write(void const*, unsigned int) const'
../../Library/Render/libRender.a(Control.o): In function `Animation::Save(File const&)':
/home/bronson/workspace/Library/Render/Control.cpp:242: undefined reference to `File::Write(void const*, unsigned int) const'
Process terminated with status 1 (0 minutes, 4 seconds)
50 errors, 32 warnings

my workspace has the follow projects: TestInstance (the final exe) Render (static library) File (static library) all projects compile, im just getting link errors. I've set up under the build options to link against libFile.a (generated from File) to both the Render project and TestInstance project ideas on what might be wrong?

Share this post


Link to post
Share on other sites
Quote:
Original post by supagu
also im linking against nvidia's CG libraries, what do i need to specifiy to link with the correct lib's for this under linux?


Apparently, libCgGL.so and libCg.so (-lCgGl -lCg).

Share this post


Link to post
Share on other sites

This topic is 3843 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this