file path problem - c

I am working on the dll project which contain 3 module.All these module include comman header file.I have the include folder path like mf/cv/include.now In the property dialog box I have give the path in c/c++>>general>>additional inclde Directories like .,..\include,..\cv\include in all the 3 module. I the 2 module its work perfectely,but in the last module fatal error occur that
fatal error C1083: Cannot open include file: 'abc.h': No such file or
directory
So I am not not able to understand what the problem in the path bacause this path work for all the module expect one.

(By 3 modules, I assume you mean 3 projects. If you meant 3 C++ files, you shouldn't be encountering this include problem.)
Instead of "..\include", try going into the property editor for that field and use the macros like $(SolutionPath)cv\include. If you examine the macros it should tell you exactly where that target will be.

Related

How to access modules from mura tag in content

I'd like to access the modules directory in /themes/[themename]/modules instead of /sites/default/themes/[themename]/modules/ from [mura]-tag in content
This is Mura Core Version 7.1.438
[mura]dspInclude('themes/[themename]/modules/sprachweiche.cfm')[/mura]
Error 500
Could not find the included template /muraWRM/sites/default/themes/[themename]/modules/sprachweiche.cfm.
To display a registered module, simply use the following syntax, and pass in the directory name of your module.
[m]$.dspObject(object='your-module-directory-name-goes-here')[/m]
That said, in your example though, it doesn't appear to be a valid "module", since you're attempting to include a file called sprachweiche.cfm. So, if you simply want to include a file, I wouldn't put it under the modules directory. So, if you have a directory under your theme called includes, you could use this instead:
[m]$.dspThemeInclude('includes/sprachweiche.cfm')[/m]
This method automatically generates the path to your theme, so you can simply pass in the rest of the path to your desired file.
Cheers!
Thanks Steve
[m]$.dspThemeInclude('includes/sprachweiche.cfm')[/m] caused the error:
Could not find the included template /muraWRM/themes/[themename]/includes/sprachweiche.cfm.
But including the modules directory to the path works:
[m]$.dspThemeInclude('modules/includes/sprachweiche.cfm')[/m]

Failing to link C code into Objective C: Undefined symbols for architecture arm64

I have some C code in my XCode project (using Objective C). I include the C file into a MyHost.m file like this:
#include <my_code.h>
And then call it like this:
my_function();
I've set up my project settings so that the Header Search Paths setting includes the directory containing my C code. However, when I build I get an error like this:
Undefined symbols for architecture arm64:
"_my_function", referenced from:
-[MyHost run] in MyHost.o
Why is the linker unable to link to the C code?
UPDATE: the reason I went down the path of using #include <file.h> instead of #include "file.h" is because the latter was failing to resolve the file. I found this related question that suggests XCode should find my header file regardless of project structure. It isn't. Even after removing and re-adding the files it still doesn't resolve it.
I had added the files as folders instead of groups. Groups are flattened by XCode and can therefore be included directly. Folders are not (but I still wasn't able to include by specifying a full path). Groups appear as yellow icons in the project view, whereas folders appear as blue.

PC-Lint Exclude External folder

I am running the pc lint misra checks on my project.
When I execute the program the output is huge because it includes all the bsp files from arm. How do I get pc-lint to exclude a whole directory. In the code when I include a header file from outside the project I use <> instead of ""
i.e. #include <arm_driver.h>.
I thought this was enough. Is their another step missing?
These are the additional parameters I have passed
+libclass(angle, foreign)
-e686
-wlib(0)
And with the command vf I can see that all the external directory files are being treated as library headers.
Finally fixed the issue.
Comment out all the explicit +elib lines in the corresponding .lnt file.
i.e. replace all instances of +elib with //+elib

How to predefine header file path in a project

I am trying to use the following method to include a project header file:
#include FILE_PATH
Where FILE_PATH is defined as the file to be included.
The project compiles without errors if FILE_PATH is include as:
#define FILE_PATH "hal/micro/config.h"
#include FILE_PATH
But if FILE_PATH is pre-defined as a compiler define option inside the project options, then building the project returns the following error:
Error #13: Expected a file name
The development software being used is Code Composer Studio version 6.
What am I missing here to pre-define the header file path in a project?
Additional Details:
I am in the process of converting a working project from the IAR embedded workbench IDE to Code Composer Studio. The Pre-define NAME (--define, -D) shown in the picture below are mostly identical to how they were in the IAR project.
The pre-define name boxed in red is currently the cause of the error, but this could occur with any of the other defines with file pathnames.
I have tried the suggestion of using the #ifdef statement to at least verify that PLATFORM_HEADER is actually defined and it does seem to be defined. I also checked for typos and there doesn't appear to be any noticeable typos.
The key reason for wanting to go with the pre-defined macro approach is to avoid individually making changes to numerous files affected by this error.
I still have not yet tried a command line compile, since I need to reference the manual on how to do so, but I will try as soon as I figure it out.
#StenSoft wrote:
The IDE does not correctly escape the parameters. You should escape the quotes. You can also try placing PLATFORM_HEADER somewhere in the code and see what the compiler would tell you it sees.

Understand the linux build process

I'm trying to build the linux kernel and would like to understand a few things:
I have added a new file (b.c) to a certain directory with the intention of having the file compiled in. The Makefile has been updated accordingly. While compiling the file, an error is thrown saying that a certain header (a.h) is not found. However, other files in the same directory use a.h without any issues.
I have observed that .o.cmd file get created for all files except b.c. Is this a prerequisite for the headers to be correctly included? Does this file have any significance to the issue I'm facing?
For eg: I added 'async_infra.o' to this line in the Makefile:
uml_gre-objs := uml_gre_kern.o uml_gre_user.o async_infra.o
uml_gre_user.c includes the header that I'd like to be included in async_infra.c
Any suggestions on what's missing and how to address the issue will be appreciated.

Resources