Code Blocks linking error

edited April 2011 in Help request
I have a main.cpp next to bin,lib,include files

The main.cpp is the tutorail 1 code - http://orx-project.org/wiki/en/orx/tutorials/object
Linking console executable: bin/Test
lib/liborxd.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status

Info: Arhclinux(64 bit),Code blocks 10.05,Orx 1.2

Code Blocks .cbp file
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
	<FileVersion major="1" minor="6" />
	<Project>
		<Option title="Test" />
		<Option pch_mode="2" />
		<Option compiler="gcc" />
		<Build>
			<Target title="Debug">
				<Option output="bin/Test" prefix_auto="1" extension_auto="1" />
				<Option object_output="bin" />
				<Option type="1" />
				<Option compiler="gcc" />
				<Option use_console_runner="0" />
				<Compiler>
					<Add option="-g" />
					<Add directory="include/" />
				</Compiler>
				<Linker>
					<Add option="-s" />
					<Add library="lib/liborxd.so" />
					<Add directory="lib/" />
				</Linker>
			</Target>
			<Target title="Release">
				<Option output="bin/Release/Test" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Release/" />
				<Option type="1" />
				<Option compiler="gcc" />
				<Compiler>
					<Add option="-O2" />
				</Compiler>
				<Linker>
					<Add option="-s" />
				</Linker>
			</Target>
		</Build>
		<Compiler>
			<Add option="-Wall" />
			<Add option="-fexceptions" />
		</Compiler>
		<Unit filename="main.cpp" />
		<Extensions>
			<envvars />
			<code_completion />
			<debugger />
		</Extensions>
	</Project>
</CodeBlocks_project_file>

Comments

  • edited April 2011
    Which version of gcc are you using?
    Orx 1.2 was built with gcc 4.2.x for linux which isn't compatible with latest versions of gcc (4.5.x).
    Also, they were built in 32b so you might need to use the "-m32" flag to use them.

    In any case I recommand using the svn version (all the dependencies have been built with gcc 4.5.x but are still 32b only). You can rebuild everything yourself if need be by using the Codelite project files (not the code::blocks as they are outdated and I'll probably remove them before the next release).

    I don't have access to a linux64 but some people are using orx successfully on it, either in 32bit (https://forum.orx-project.org/discussion/1853) or 64bit modes (https://forum.orx-project.org/discussion/1535).

    In your case, the packages provided by Eyecreate (the link just above) might be what is most suited.
  • edited April 2011
    Um.. gcc 4.5x
    ... opensuse build system is down.. and there is no Archlinux build. Oh well, if all fails build from source.
Sign In or Register to comment.