link static library with headers with Green Hills compilerDifference between static and shared libraries?Multiply defined linker error using inlined functionsDifference between shared objects (.so), static libraries (.a), and DLL's (.so)?Xcode 4 plain C static library linkingSymbols missing after statically linking lua libraryHow to create Build log file in Greenhills compiler?Including all dependencies in Static LibraryUndefined reference to symbol on a static libraryLinking on different version of shared librariesAdding static library to my existing project - Greenhills compiler
If I leave the US through an airport, do I have to return through the same airport?
Warning about needing "authorization" when booking ticket
With Ubuntu 18.04, how can I have a hot corner that locks the computer?
How to decline a wedding invitation from a friend I haven't seen in years?
What is inside of the 200 star chest?
Heap allocation on microcontroller
Second (easy access) account in case my bank screws up
Why is a common reference string needed in zero knowledge proofs?
Ability To Change Root User Password (Vulnerability?)
How can I search for all contacts without email?
Is it a bad idea to to run 24 tap and shock lands in standard
I have a problematic assistant manager, but I can't fire him
Let M and N be single-digit integers. If the product 2M5 x 13N is divisible by 36, how many ordered pairs (M,N) are possible?
What ways have you found to get edits from non-LaTeX users?
How to ensure color fidelity of the same file on two computers?
Determining fair price for profitable mobile app business
Wooden cooking layout
Why 1,2 printed by a command in $() is not interpolated?
Why am I getting a strange double quote (“) in Open Office instead of the ordinary one (")?
Why not invest in precious metals?
Is it expected that a reader will skip parts of what you write?
How can I end combat quickly when the outcome is inevitable?
Generate basis elements of the Steenrod algebra
How do free-speech protections in the United States apply in public to corporate misrepresentations?
link static library with headers with Green Hills compiler
Difference between static and shared libraries?Multiply defined linker error using inlined functionsDifference between shared objects (.so), static libraries (.a), and DLL's (.so)?Xcode 4 plain C static library linkingSymbols missing after statically linking lua libraryHow to create Build log file in Greenhills compiler?Including all dependencies in Static LibraryUndefined reference to symbol on a static libraryLinking on different version of shared librariesAdding static library to my existing project - Greenhills compiler
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have a static library .a with several header files provided. I want to link it with .o files into binary using Green hills compiler.
The error I get is: [elxr] (error #412) unresolved symbols.
I am trying to specify path to header files providing -I filepath to linker.
However, this does not seem to work.
Updated with code.
# Recipe for linking
__GHSRH850_ERRALL += $(__GHSRH850_TARGETERR)
GHSRH850_LIB = SRCMCUDROMERGLlibd1mx_rh850_ghs.a
$(GHSRH850_TARGETEMU): $(__GHSRH850_OBJS) $(GHSRH850_LSCRIPT) $(GHSRH850_LIB)
$(CORE_MAKPREREQS) | __GHSRH850_DIRS
$(call CORE_REPORTFILE,Linking,$(@F))
$(eval __GHSRH850_ERRDONE += $(__GHSRH850_TARGETERR))
$(GHSRH850_LD)
$(GHSRH850_LSCRIPT)
-o $@
$(GHSRH850_LIB)
$(__GHSRH850_OBJS)
$(GHSRH850_LFLAGS)
> $(__GHSRH850_TARGETERR)
The make file is quite huge, so I cannot put all of it here. Basically library is added with:
GHSRH850_LIB = filepathtolibname.a
In flags added filepath to headers with:
GHSRH850_LFLAGS += -I filepathtoheaders
Other descriptions are:
GHSRH850_LFLAGS - Linker flags
GHSRH850_LSCRIPT - Linker script file
__GHSRH850_OBJS - Object files list
Compiler that is used ccrh850.exe.
Error code:
[elxr] (error #412) unresolved symbols: 35
_R_UTIL_DHD_Init from drglgmm_dhd.o
_R_UTIL_DHD_Config from drglgmm_dhd.o
_R_DEV_SQRTF from libd1mx_rh850_ghs.a(r_drw2d_main.o)
_R_VDCE_Sys_HsyncActLevelSet from libd1mx_rh850_ghs.a(r_vdce_api.o)
c greenhills
|
show 2 more comments
I have a static library .a with several header files provided. I want to link it with .o files into binary using Green hills compiler.
The error I get is: [elxr] (error #412) unresolved symbols.
I am trying to specify path to header files providing -I filepath to linker.
However, this does not seem to work.
Updated with code.
# Recipe for linking
__GHSRH850_ERRALL += $(__GHSRH850_TARGETERR)
GHSRH850_LIB = SRCMCUDROMERGLlibd1mx_rh850_ghs.a
$(GHSRH850_TARGETEMU): $(__GHSRH850_OBJS) $(GHSRH850_LSCRIPT) $(GHSRH850_LIB)
$(CORE_MAKPREREQS) | __GHSRH850_DIRS
$(call CORE_REPORTFILE,Linking,$(@F))
$(eval __GHSRH850_ERRDONE += $(__GHSRH850_TARGETERR))
$(GHSRH850_LD)
$(GHSRH850_LSCRIPT)
-o $@
$(GHSRH850_LIB)
$(__GHSRH850_OBJS)
$(GHSRH850_LFLAGS)
> $(__GHSRH850_TARGETERR)
The make file is quite huge, so I cannot put all of it here. Basically library is added with:
GHSRH850_LIB = filepathtolibname.a
In flags added filepath to headers with:
GHSRH850_LFLAGS += -I filepathtoheaders
Other descriptions are:
GHSRH850_LFLAGS - Linker flags
GHSRH850_LSCRIPT - Linker script file
__GHSRH850_OBJS - Object files list
Compiler that is used ccrh850.exe.
Error code:
[elxr] (error #412) unresolved symbols: 35
_R_UTIL_DHD_Init from drglgmm_dhd.o
_R_UTIL_DHD_Config from drglgmm_dhd.o
_R_DEV_SQRTF from libd1mx_rh850_ghs.a(r_drw2d_main.o)
_R_VDCE_Sys_HsyncActLevelSet from libd1mx_rh850_ghs.a(r_vdce_api.o)
c greenhills
1
Please provide your actual command line that you are trying to use to link the binary together.
– Ahmed Masud
Mar 14 at 14:38
I find your lack of code... disturbing. Please add some code so that we can help you better. Thanks!
– user10976548
Mar 14 at 14:38
Blimey! Do Green Hills still make C compilers or is this for an ancient system? (I remember when the Green Hills C compiler command was confusingly calledgcc
around 30 years ago.)
– Ian Abbott
Mar 14 at 14:38
3
Welcome to Stack Overflow. Please read How to Ask and minimal reproducible example and post your question with the exact example of what's going wrong so we can help. Thank you
– Ahmed Masud
Mar 14 at 14:38
2
The path to the header files should be irrelevant if you are getting linker errors. Perhaps you need to specify the path to the library files. Traditionally, forcc
that was done with the-L
option, so I guess it is the same for the Green Hills C compiler. Also the lower-casel
option specifies the library name without the lib prefix, e.g.-lname
specifieslibname.a
orlibname.so
.
– Ian Abbott
Mar 14 at 14:47
|
show 2 more comments
I have a static library .a with several header files provided. I want to link it with .o files into binary using Green hills compiler.
The error I get is: [elxr] (error #412) unresolved symbols.
I am trying to specify path to header files providing -I filepath to linker.
However, this does not seem to work.
Updated with code.
# Recipe for linking
__GHSRH850_ERRALL += $(__GHSRH850_TARGETERR)
GHSRH850_LIB = SRCMCUDROMERGLlibd1mx_rh850_ghs.a
$(GHSRH850_TARGETEMU): $(__GHSRH850_OBJS) $(GHSRH850_LSCRIPT) $(GHSRH850_LIB)
$(CORE_MAKPREREQS) | __GHSRH850_DIRS
$(call CORE_REPORTFILE,Linking,$(@F))
$(eval __GHSRH850_ERRDONE += $(__GHSRH850_TARGETERR))
$(GHSRH850_LD)
$(GHSRH850_LSCRIPT)
-o $@
$(GHSRH850_LIB)
$(__GHSRH850_OBJS)
$(GHSRH850_LFLAGS)
> $(__GHSRH850_TARGETERR)
The make file is quite huge, so I cannot put all of it here. Basically library is added with:
GHSRH850_LIB = filepathtolibname.a
In flags added filepath to headers with:
GHSRH850_LFLAGS += -I filepathtoheaders
Other descriptions are:
GHSRH850_LFLAGS - Linker flags
GHSRH850_LSCRIPT - Linker script file
__GHSRH850_OBJS - Object files list
Compiler that is used ccrh850.exe.
Error code:
[elxr] (error #412) unresolved symbols: 35
_R_UTIL_DHD_Init from drglgmm_dhd.o
_R_UTIL_DHD_Config from drglgmm_dhd.o
_R_DEV_SQRTF from libd1mx_rh850_ghs.a(r_drw2d_main.o)
_R_VDCE_Sys_HsyncActLevelSet from libd1mx_rh850_ghs.a(r_vdce_api.o)
c greenhills
I have a static library .a with several header files provided. I want to link it with .o files into binary using Green hills compiler.
The error I get is: [elxr] (error #412) unresolved symbols.
I am trying to specify path to header files providing -I filepath to linker.
However, this does not seem to work.
Updated with code.
# Recipe for linking
__GHSRH850_ERRALL += $(__GHSRH850_TARGETERR)
GHSRH850_LIB = SRCMCUDROMERGLlibd1mx_rh850_ghs.a
$(GHSRH850_TARGETEMU): $(__GHSRH850_OBJS) $(GHSRH850_LSCRIPT) $(GHSRH850_LIB)
$(CORE_MAKPREREQS) | __GHSRH850_DIRS
$(call CORE_REPORTFILE,Linking,$(@F))
$(eval __GHSRH850_ERRDONE += $(__GHSRH850_TARGETERR))
$(GHSRH850_LD)
$(GHSRH850_LSCRIPT)
-o $@
$(GHSRH850_LIB)
$(__GHSRH850_OBJS)
$(GHSRH850_LFLAGS)
> $(__GHSRH850_TARGETERR)
The make file is quite huge, so I cannot put all of it here. Basically library is added with:
GHSRH850_LIB = filepathtolibname.a
In flags added filepath to headers with:
GHSRH850_LFLAGS += -I filepathtoheaders
Other descriptions are:
GHSRH850_LFLAGS - Linker flags
GHSRH850_LSCRIPT - Linker script file
__GHSRH850_OBJS - Object files list
Compiler that is used ccrh850.exe.
Error code:
[elxr] (error #412) unresolved symbols: 35
_R_UTIL_DHD_Init from drglgmm_dhd.o
_R_UTIL_DHD_Config from drglgmm_dhd.o
_R_DEV_SQRTF from libd1mx_rh850_ghs.a(r_drw2d_main.o)
_R_VDCE_Sys_HsyncActLevelSet from libd1mx_rh850_ghs.a(r_vdce_api.o)
c greenhills
c greenhills
edited Mar 14 at 15:30
Fen
asked Mar 14 at 14:36
FenFen
64
64
1
Please provide your actual command line that you are trying to use to link the binary together.
– Ahmed Masud
Mar 14 at 14:38
I find your lack of code... disturbing. Please add some code so that we can help you better. Thanks!
– user10976548
Mar 14 at 14:38
Blimey! Do Green Hills still make C compilers or is this for an ancient system? (I remember when the Green Hills C compiler command was confusingly calledgcc
around 30 years ago.)
– Ian Abbott
Mar 14 at 14:38
3
Welcome to Stack Overflow. Please read How to Ask and minimal reproducible example and post your question with the exact example of what's going wrong so we can help. Thank you
– Ahmed Masud
Mar 14 at 14:38
2
The path to the header files should be irrelevant if you are getting linker errors. Perhaps you need to specify the path to the library files. Traditionally, forcc
that was done with the-L
option, so I guess it is the same for the Green Hills C compiler. Also the lower-casel
option specifies the library name without the lib prefix, e.g.-lname
specifieslibname.a
orlibname.so
.
– Ian Abbott
Mar 14 at 14:47
|
show 2 more comments
1
Please provide your actual command line that you are trying to use to link the binary together.
– Ahmed Masud
Mar 14 at 14:38
I find your lack of code... disturbing. Please add some code so that we can help you better. Thanks!
– user10976548
Mar 14 at 14:38
Blimey! Do Green Hills still make C compilers or is this for an ancient system? (I remember when the Green Hills C compiler command was confusingly calledgcc
around 30 years ago.)
– Ian Abbott
Mar 14 at 14:38
3
Welcome to Stack Overflow. Please read How to Ask and minimal reproducible example and post your question with the exact example of what's going wrong so we can help. Thank you
– Ahmed Masud
Mar 14 at 14:38
2
The path to the header files should be irrelevant if you are getting linker errors. Perhaps you need to specify the path to the library files. Traditionally, forcc
that was done with the-L
option, so I guess it is the same for the Green Hills C compiler. Also the lower-casel
option specifies the library name without the lib prefix, e.g.-lname
specifieslibname.a
orlibname.so
.
– Ian Abbott
Mar 14 at 14:47
1
1
Please provide your actual command line that you are trying to use to link the binary together.
– Ahmed Masud
Mar 14 at 14:38
Please provide your actual command line that you are trying to use to link the binary together.
– Ahmed Masud
Mar 14 at 14:38
I find your lack of code... disturbing. Please add some code so that we can help you better. Thanks!
– user10976548
Mar 14 at 14:38
I find your lack of code... disturbing. Please add some code so that we can help you better. Thanks!
– user10976548
Mar 14 at 14:38
Blimey! Do Green Hills still make C compilers or is this for an ancient system? (I remember when the Green Hills C compiler command was confusingly called
gcc
around 30 years ago.)– Ian Abbott
Mar 14 at 14:38
Blimey! Do Green Hills still make C compilers or is this for an ancient system? (I remember when the Green Hills C compiler command was confusingly called
gcc
around 30 years ago.)– Ian Abbott
Mar 14 at 14:38
3
3
Welcome to Stack Overflow. Please read How to Ask and minimal reproducible example and post your question with the exact example of what's going wrong so we can help. Thank you
– Ahmed Masud
Mar 14 at 14:38
Welcome to Stack Overflow. Please read How to Ask and minimal reproducible example and post your question with the exact example of what's going wrong so we can help. Thank you
– Ahmed Masud
Mar 14 at 14:38
2
2
The path to the header files should be irrelevant if you are getting linker errors. Perhaps you need to specify the path to the library files. Traditionally, for
cc
that was done with the -L
option, so I guess it is the same for the Green Hills C compiler. Also the lower-case l
option specifies the library name without the lib prefix, e.g. -lname
specifies libname.a
or libname.so
.– Ian Abbott
Mar 14 at 14:47
The path to the header files should be irrelevant if you are getting linker errors. Perhaps you need to specify the path to the library files. Traditionally, for
cc
that was done with the -L
option, so I guess it is the same for the Green Hills C compiler. Also the lower-case l
option specifies the library name without the lib prefix, e.g. -lname
specifies libname.a
or libname.so
.– Ian Abbott
Mar 14 at 14:47
|
show 2 more comments
1 Answer
1
active
oldest
votes
Thanks all for quick answer. The problem was solved.
Basically errors appeared due to other source files were not compiling, because of missing headers and compiler did not throw any notification about that. Thus, when all object files compiled errors have gone. The correct way to add library is either to add path as I did or use -lname as mentioned by Ian Abbot.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55165234%2flink-static-library-with-headers-with-green-hills-compiler%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks all for quick answer. The problem was solved.
Basically errors appeared due to other source files were not compiling, because of missing headers and compiler did not throw any notification about that. Thus, when all object files compiled errors have gone. The correct way to add library is either to add path as I did or use -lname as mentioned by Ian Abbot.
add a comment |
Thanks all for quick answer. The problem was solved.
Basically errors appeared due to other source files were not compiling, because of missing headers and compiler did not throw any notification about that. Thus, when all object files compiled errors have gone. The correct way to add library is either to add path as I did or use -lname as mentioned by Ian Abbot.
add a comment |
Thanks all for quick answer. The problem was solved.
Basically errors appeared due to other source files were not compiling, because of missing headers and compiler did not throw any notification about that. Thus, when all object files compiled errors have gone. The correct way to add library is either to add path as I did or use -lname as mentioned by Ian Abbot.
Thanks all for quick answer. The problem was solved.
Basically errors appeared due to other source files were not compiling, because of missing headers and compiler did not throw any notification about that. Thus, when all object files compiled errors have gone. The correct way to add library is either to add path as I did or use -lname as mentioned by Ian Abbot.
answered Mar 24 at 18:52
FenFen
64
64
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55165234%2flink-static-library-with-headers-with-green-hills-compiler%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Please provide your actual command line that you are trying to use to link the binary together.
– Ahmed Masud
Mar 14 at 14:38
I find your lack of code... disturbing. Please add some code so that we can help you better. Thanks!
– user10976548
Mar 14 at 14:38
Blimey! Do Green Hills still make C compilers or is this for an ancient system? (I remember when the Green Hills C compiler command was confusingly called
gcc
around 30 years ago.)– Ian Abbott
Mar 14 at 14:38
3
Welcome to Stack Overflow. Please read How to Ask and minimal reproducible example and post your question with the exact example of what's going wrong so we can help. Thank you
– Ahmed Masud
Mar 14 at 14:38
2
The path to the header files should be irrelevant if you are getting linker errors. Perhaps you need to specify the path to the library files. Traditionally, for
cc
that was done with the-L
option, so I guess it is the same for the Green Hills C compiler. Also the lower-casel
option specifies the library name without the lib prefix, e.g.-lname
specifieslibname.a
orlibname.so
.– Ian Abbott
Mar 14 at 14:47