标签: asmjit

gcc -D选项没有做我想的那样

我正在尝试在项目中使用AsmJit.这是我使用的makefile:

CC = g++
CFLAGS = -D ASMJIT_API -I dep/

test: src/main.cpp
        $(CC) $(CFLAGS) src/main.cpp -o test.exe
Run Code Online (Sandbox Code Playgroud)

尝试这个时我遇到了编译器错误,所以我#define ASMJIT_API从dep/AsmJit/Config.h 取消注释了这行,并从makefile中删除了-D开关,干净地编译了所有内容.我正在使用gcc 4.5.3.有任何想法吗?

谢谢.

编辑:编译器错误

g++ -DASMJIT_API -Idep/ src/main.cpp -o test.exe
In file included from dep/AsmJit/Assembler.h:31:0,
                 from src/main.cpp:1:
dep/AsmJit/Build.h:274:1: error: expected unqualified-id before numeric constant
In file included from dep/AsmJit/AssemblerX86X64.h:36:0,
                 from dep/AsmJit/Assembler.h:51,
                 from src/main.cpp:1:
dep/AsmJit/Defs.h:408:1: error: expected unqualified-id before numeric constant
In file included from dep/AsmJit/DefsX86X64.h:36:0,
                 from dep/AsmJit/Defs.h:423,
                 from dep/AsmJit/AssemblerX86X64.h:36,
                 from dep/AsmJit/Assembler.h:51,
                 from src/main.cpp:1:
dep/AsmJit/Util.h:412:8: error: expected identifier before numeric …
Run Code Online (Sandbox Code Playgroud)

gcc makefile asmjit

6
推荐指数
1
解决办法
2249
查看次数

标签 统计

asmjit ×1

gcc ×1

makefile ×1