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 -
Linking console executable: bin/Test
lib/ 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" ?>
	<FileVersion major="1" minor="6" />
		<Option title="Test" />
		<Option pch_mode="2" />
		<Option compiler="gcc" />
			<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" />
					<Add option="-g" />
					<Add directory="include/" />
					<Add option="-s" />
					<Add library="lib/" />
					<Add directory="lib/" />
			<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" />
					<Add option="-O2" />
					<Add option="-s" />
			<Add option="-Wall" />
			<Add option="-fexceptions" />
		<Unit filename="main.cpp" />
			<envvars />
			<code_completion />
			<debugger />


  • 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 ( or 64bit modes (

    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.