Opened 13 years ago

Closed 13 years ago

#8019 closed bug (fixed)

Cannot build driver with makefile-engine

Reported by: jackburton Owned by: siarzhuk
Priority: normal Milestone: R1
Component: - General Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I'm trying to build a driver on Haiku, using the makefile-engine. I set the TYPE correctly to "DRIVER", but linking fails with undefined references to main() and dprintf(). I looked in the makefile-engine and for the type=DRIVER it should already link against "_KERNEL_", I also tried to add _KERNEL_ to the list of libraries in my makefiles, but it doesn't seem to work. The driver is a cpp file.

Attachments (1)

makefile (4.6 KB ) - added by jackburton 13 years ago.
makefile

Download all attachments as: .zip

Change History (7)

comment:1 by siarzhuk, 13 years ago

Can you attach your makefile? I'm using makefile-engine in drivers for years and have no such problems.

by jackburton, 13 years ago

Attachment: makefile added

makefile

comment:2 by jackburton, 13 years ago

Attached makefile.

comment:3 by siarzhuk, 13 years ago

In case the linker complaints about missed "main" linkage - this can mean that the type of module is default - APP but not the DRIVER.

9	# specify the name of the binary
10	NAME= hpet
11	
12	# specify the type of binary
13	#   APP:    Application
14	#   SHARED: Shared library or add-on
15	#   STATIC: Static library archive
16	#   DRIVER: Kernel Driver
17	TYPE= DRIVER

try to remove spaces before the name and the type of module:

9	# specify the name of the binary
10	NAME=hpet
11	
12	# specify the type of binary
13	#   APP:    Application
14	#   SHARED: Shared library or add-on
15	#   STATIC: Static library archive
16	#   DRIVER: Kernel Driver
17	TYPE=DRIVER

comment:4 by jackburton, 13 years ago

The problem was a space AFTER the "TYPE=DRIVER". I guess this should be fixed if possible.

in reply to:  4 comment:5 by siarzhuk, 13 years ago

Owner: changed from nobody to siarzhuk
Status: newassigned

comment:6 by siarzhuk, 13 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev42864. Thanks for the pointing.

Note: See TracTickets for help on using tickets.