Bad syntax include in Minix - syntax

I am developing a project for Minix in C Language and I have a folder to put the drivers of the devices called core. In the main.c I did an include of the vbe.h that is inside this folder and the make give me allways an error of bad syntax.
I tried two ways:
#include "./core/vbe.h"
#include "core/vbe.h"
I have always an error!
Can anyone help me?

Just so that the internet knows, I got this error and solved it. I believe I understand the reason as well.
I had used an array within a file which was not initialized. When I noticed this and commented the array out, it compiled fine.
My reasoning for the wording of the error is that it assumed I wanted to include this array, and that I forgot to include another file. So annoying.

Related

Odd python driver files in micropython for esp32 and esp8266 cause make errors

I've been trying to build a micropython for esp32-camera and I keep getting errors during the make process when building some of the drivers in the mp/ports/esp32/modules directory. The error I get is a syntax error. For example there's a file named ntptime.py in this directory and it contains a single line:
../../esp8266/modules/ntptime.py
and that results in "SyntaxError: invalid syntax"
I've programmed python for a while, but am not familiar with this concept and don't understand how it can work, but maybe it can? I'm not familiar with doing that and since it's not working when I run make, maybe there's something setup-wise that I've missed or whatever. Can anyone shed some light on this practice and explain under what circumstances this works to direct make (or the python compiler) to resolve this statement by loading the source from the directory specified in that single line of code.
Duh, can't believe I missed this: there "files" are symbolic links; I should've remembered that, but alas, I'm getting older by the minute!
Still, it doesn't answer the question as to why they weren't being recognized during make but instead throwing a SyntaxError; but I'll leave that for another day.

C++ Additional Includes VS 2013

So I have a structure like below. (Similar to bigger project I'm really working on)
tryWithNewLib\testProject\testProject\testProject.vcxprog
tryWithNewLib\testProject\testProject.sln
I have this open source library I want to use.
tryWithNewLib\XERCESCPKG-31-VC100\include\xercesc\util
Additional Include Directories:
D:\tryWithNewLib\XERCESCPKG-31-VC100\include;%(AdditionalIncludeDirectories)
I am expecting this to work:
#include <xercesc/util/PlatformUtils.hpp>
Any ideas on what I am doing wrong?
I believe the issue may have been that I was updating Additional include Directories for the wrong configuration. (I've changed a million things so I'm not sure this is really the fix).

How to specify library paths for sonar-runner with C code

I am trying to set up sonar-runner on a legacy code base. It seems to be working. However, I get several warnings like this:
WARN #include the file filename1.h could not be found at file:filename2.h. Please check your additional library configuration.
I found a property I can possibly set in the sonar-project.properties file to point to all the library directories:
sonar.c.library.directories=/path/to/library/
My problem is, there are seriously about 50 directories I will need to include to capture them all, and as far as I can tell, I need to type them all on a single line, comma-separated.
So, my question is,
is it worth it?
Does sonar-runner need to find these dependencies to do an appropriate analysis? Would I gain anything at all, or should I just let it be?

time not declared in scope, how do I find which includes a file uses?

This is driving me nuts, I have been stuck on this problem for a few hours. I'm using time.h in several files in my project, and on every one get the error "time was not declared in scope" when I try to use the function time(). The strange thing is time_t is defined, I get no errors about it. I thought perhaps it was pulling in the C++ version somehow so tried using namespace std:: but that didn't work either. struct tm and localtime aren't declared in scope either. All code compiles fine on other systems BTW.
I'm going nuts here, how can I figure out what headers a file is using, what is defined or what is going on? I don't know how to proceed, please help!
I am using GCC 4.2 in Xcode 3.2.5 with 10.6 SDK
In case you want to see the code here it is, not useful though, it has to be a compiler/include file problem I think.
time_t long_time;
time(&long_time);
tm* st = localtime(&long_time);
sprintf(temp, "%02d:%02d:%02d %02d.%02d.%04d ",
st->tm_hour, st->tm_min, st->tm_sec, st->tm_mon+1, st->tm_mday, st->tm_year+1900);
found the problem. i am using enet which has a header called time.h, because xcode couldn't find the enet files under a sub directory I included it in my User Header Search Paths, apparently the compiler looks in user paths first and was pulling in the enet time.h instead of the system one

How do I know which OSBundleLibrary to include when using XCode?

It seems that I am doing something wrong or the linker is not very good in xcode (I imagine is the first situation :) ) but I found that I need to manually add the OSBundleLibrary references on the plist.
The problem is that sometimes I don't know which bundles should I include, for example, I am building a kernel extension and I am using VFS, it compiles but when I try to load it into the kernel it complains that it can not resolve all the VFS functions.
I usually include "com.apple.kernel.bsd" but when I check samples of VFS I can see "com.apple.kpi.bsd", a bit confusing.
Can anyone share some light?
Thanks!
I found the solution, there is a reference link with all the extensions:
http://developer.apple.com/documentation/Darwin/Conceptual/KEXTConcept/KEXTConceptDependencies/kext_dependencies.html

Resources