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)
Change History (7)
comment:1 by , 13 years ago
comment:3 by , 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
follow-up: 5 comment:4 by , 13 years ago
The problem was a space AFTER the "TYPE=DRIVER". I guess this should be fixed if possible.
comment:6 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in hrev42864. Thanks for the pointing.
Can you attach your makefile? I'm using makefile-engine in drivers for years and have no such problems.