Skip to content

cmd/cgo: ${SRCDIR} doesn't properly handle paths with spaces #11868

Closed
@jtsylve

Description

@jtsylve

Given a cgo directive like the following

//#cgo CFLAGS: -I${SRCDIR}/../../include

I get the following error

malformed #cgo argument: -IC:/Users/Joe Sylve/go/src/go4n6/disk/vmdk/../../include

Neither of the following seem to make much of a difference

//#cgo CFLAGS: -I"${SRCDIR}/../../include"
//#cgo CFLAGS: -I\"${SRCDIR}/../../include\"

Tested on go1.5beta2 on both 32 and 64 bit Windows.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions