我正在研究用于android的chrome源代码:尝试在Webkit中开发一些功能。
我做了什么: (1)在“third_party / WebKit / Source / core / frame”中创建test.cpp / test.h:test.cpp包含addlib.h调用addlib.so中的求和函数(在下一步中创建) (2)通过“g ++ -fPIC -shared addlib.cpp -o addlib.so”在“third_party / WebKit / Source / core / frame”中创建add.h和add.so(addlib.so仅提供求和二的函数)整数并返回结果)
module.js:538
throw err;
^
Error: Cannot find module 'C:\Users\Haider Ali\Desktop\OLS\OLS\views\app.js'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
我的目的:在test.cpp中调用addlib.so中的函数
但是gn给我错误信息:
blink_core_sources("frame") {
sources = [
"BarProp.cpp",
"BarProp.h",
"BrowserControls.cpp",
"BrowserControls.h",
"ContentSettingsClient.cpp",
.........
"csp/ContentSecurityPolicy.cpp",
"csp/ContentSecurityPolicy.h",
"csp/MediaListDirective.cpp",
"csp/MediaListDirective.h",
"csp/SourceListDirective.cpp",
"csp/SourceListDirective.h",
// my modification
"test.h",
"test.cpp",
"addlib.h"
]
// my modification
shared_library = [ ":addlib.so" ]
}
对我有什么建议吗?非常感谢。