News:

  • February 01, 2023, 11:32:32 AM

Login with username, password and session length

Author Topic: linux build  (Read 3660 times)

hal

  • Newbie
  • *
  • Posts: 4
linux build
« on: August 06, 2010, 11:33:47 PM »
Has anyone built the source from the Linux port recently?

My first make resulted in:

Code: [Select]
gcc -fPIC -g -c -Wall -DHEIUNIX iobase.cpp
In file included from ../headers/hei.h:11,
                 from ../headers/stdafx.h:18,
                 from iobase.cpp:1:
../headers/defs.h:32:1: warning: "NULL" redefined
In file included from /usr/include/stdlib.h:33,
                 from ../headers/stdafx.h:17,
                 from iobase.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/stddef.h:400:1: warning: this is the location of the previous definition
In file included from iobase.cpp:3:
../headers/iobase.h:13: error: extra qualification 'CModule::' on member 'IsSupported'
iobase.cpp: In constructor 'CEbcIO::CEbcIO(HEIDevice*, BOOL)':
iobase.cpp:180: warning: unused variable 'ModuleCount'
make: *** [iobase.o] Error 1

I dropped the "CModule::" part in iobase.h, then:

Code: [Select]
gcc -shared -DHEIUNIX -g -Wl,-soname,libhei.so.1 -o libhei.so.1.0.1 intrface.o hei_ext.o hei.o iobase.o stdafx.o -lc
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `hei_ext.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `hei.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-llaplace library # gcc -m32 hei_ext.c

So I try to rebuild hei_ext.c (gcc -m32):

Code: [Select]
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
/tmp/cc4dXN7l.o: In function `GetResponseEx':
hei_ext.c:(.text+0x87): undefined reference to `HEIGetResponse'
/tmp/cc4dXN7l.o: In function `StartHEIReadIO':
hei_ext.c:(.text+0x204): undefined reference to `HEIIGetCounter'
hei_ext.c:(.text+0x220): undefined reference to `HEIReadIO'
/tmp/cc4dXN7l.o: In function `HEIReadIOEx':
hei_ext.c:(.text+0x3ed): undefined reference to `HEIIGetCounter'
hei_ext.c:(.text+0x403): undefined reference to `HEIIGetCounter'
hei_ext.c:(.text+0x41e): undefined reference to `HEIIGetCounter'
/tmp/cc4dXN7l.o: In function `StartHEIWriteIO':
hei_ext.c:(.text+0x562): undefined reference to `HEIIGetCounter'
hei_ext.c:(.text+0x58d): undefined reference to `HEIWriteIO'
/tmp/cc4dXN7l.o: In function `HEIWriteIOEx':
hei_ext.c:(.text+0x789): undefined reference to `HEIIGetCounter'
hei_ext.c:(.text+0x79f): undefined reference to `HEIIGetCounter'
hei_ext.c:(.text+0x7ba): undefined reference to `HEIIGetCounter'
collect2: ld returned 1 exit status

If anyone has built the SDK on a 32- or 64-bit Linux machine lately, I'd be very interested in what you did.

hal

  • Newbie
  • *
  • Posts: 4
Re: linux build
« Reply #1 on: August 08, 2010, 04:38:08 PM »
So the library actually builds once "CModule::" is removed as mentioned above.  I had hacked on other parts of the headers (things like linker flags and renameing HEIUNIX to HEIT_UNIX, assuming it was a typo); these hacks broke the source.