Code composer inline function linker error - c

I am working with Code Composer Studio and I need to inline some functions.
So I put them in a header file (or in .inl file referred by a header, both ways) and try to build my project.
The problem comes when I increase the optimization level. The project builds successfully under no optimization, (off or none) but the linker fails to link them and returns:
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking;
Has anyone encountered similar issues?
Is is because am not utilizing some kind of flag in the compiler options?

Please check this link http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/249183.aspx .
When SW_ROOT was correctly defined, this issue was resolved.

Related

Borland C++ Builder 4 [Linker Error] Unresolved external

I'm trying to compile an old project in Borland C++ Builder 4. I have a working exe and the source files for that, therefore someone must have managed to compile it earlier. However, when I open the project, check if the project hs all the necessary files in the resources and try to compile it, I keep getting the following linker error:
[Linker Error] Unresolved external '_fastcall TMapperForm::Button1Click(System::TObject*)' referenced from ...\Unit1.obj
I can see that it cannot find an object in the library but I am not sure how to resolve it, because the obj file with the same name as the main cpp file is in the same file as the other files of the project and seems fine.
I have looked through the answers provided here for similar linker errors but none of what these have suggested worked for me. I have already tried the following:
Adding the .obj file to the Project Resources.
Trying to add pragma lines manually such as #pragma link (Unit1.obj)
Making sure that in Project>Options>Directories the right Include and Library paths were selected.
Checking if all the packages have been added.
None of this seems to work. I am fairly new to C++ and C++ Builder, so I am hoping that it is something trivial.
Has anybody seen this particular error?
The error was caused by a missing handler or more precisely a handler containing nothing.
While the handler for the button contained nothing, the TMapperForm class still included the definitions for an extra button named Button1 but it was not used. Commenting out the method and the declaration in the TMapperForm class (in the header file for Unit1) along with the handler in the C++ file resolved the problem.

c program security_getenforce() not found

I am trying to gcc my library with another static library and I get this error while runtime
undefined symbol: security_getenforce
I am thinking this is related to selinux, not sure though... how do I resolve this?
Thanks,
Vik.
Figured it out, use -lselinux as the flag to resolve the issue and load the necessary libraries.

LNK2020 & LNK1120 errors in old class in old working project since other project added that includes same class

I am getting unexpected linker errors after refactoring my solution from 1 to 3 projects. In this first instance I get two unresolved tokens, like
error LNK2020: unresolved token (0600000C) Mynamespace.MyClass::unresolvedStaticFunc
error LNK2020: unresolved token (0600000C) Mynamespace.MyClass::unresolvedOtherStaticFunc
fatal error LNK1120: 2 unresolved externals
I have not touched this class in my refactoring. Both methods are declared static in the header but not the body (cpp file).
I've rechecked my errors and the new project is compiling fine but forcing the old one to break on linking.
I think I need to add files to my new projects but they seem nicely separated into their own folders now. Another project for the shared class perhaps? I am adding what I thought a simple feature and my project count has already tripled.
You should not be #includeing header files containing managed types across multiple projects. Instead, in the new project, add an assembly reference to the old project; this way, the type information will be gathered from the .NET metadata embedded into the old project's assembly.

How can I import compiled C++ libraries into an Objective-C++ project in Xcode 4?

I'm trying to use the SkypeKit SDK to create an Objective-C++ project using Xcode 4. I have two compiled libraries from SkypeKit, libskypekit_cyassl_lib.a and libskypekit_cppwrapper_2_lib.a, which I need to be able to use so as to access the Skype API.
I've added in both .a files under 'Linked Frameworks and Libraries' and added -all_load -ObjC -lstdc++ to the 'Other Linker Flags', and that builds okay, but as soon as I try to use any of the methods in those libraries, building fails.
Any help would be greatly appreciated, thank you!
You can call C++ code from Objective-C++, which means that your files should have the .mm extension instead of .m
I assume that this could be the issue, but since you did not specify the errors you get it is just a guess. Specifically, if you call C++ code from a .m file you get compilation errors.
Another possible cause is forgetting to import the header files of the library. For the import to be successful, you also have to add the directory where the headers are to your project "header search path".
If this does not help, please post the error message.

XCode 4 - linker errors

After having upgraded to XCode 4 im getting some linker warnings that Im a bit baffled about.
My first 2 linker warnings are related to InMobi libraries (an Ads provider).
These warnings are complaining about a Directory that can't be found.
The only thing I can see is that perhaps "Xcode" doesn't like a directory path with a "../" in it.
The "library search paths" look correct.
\"$(SRCROOT)/../AdUtilities/AdProviders/InMobi/iPhone_3.x\"
Note that the SRCRoot (the App folder) is a sibling (the same folder location) as the Adutilities folder. What could be it's problem???
* updated *
I tried providing the full library path, but still same warnings.
* updated 2 *
the ad provider causing the link issues was InMobi.
I removed all references to InMobi, now things are building without warnings.
* Updated *
This was causing more problems that what it was worth. I just removed InMobi as one of my ad providers. now everything builds with errors or warnings.

Resources