I am trying to create a DiffMerge like app that will show me differences between Rhapsody diagrams more friendly.
I did some research and I found out that someone did a .sbs to .xml file convertor[1], which then can be parsed easily.
Now, when I try to compile the file using make all I get this error:
flex lexer.l
gawk "/#define YY_BUF_SIZE/{gsub(/16384/, "(1024*1024)")};{print}" lex.yy.c > lex.yy.c.new
/bin/sh: 1: Syntax error: "(" unexpected
make: *** [flex] Error 2
Could you help me solve this?
The files I used are on the Git link below.
Note: I commented the line with SHELL=... from Makefile because I'm working in Linux.
[1] https://github.com/PrzemekWirkus/sbs2xml-conv
Just change the "s around the script to 's (which they always should be anyway):
gawk '/#define YY_BUF_SIZE/{gsub(/16384/, "(1024*1024)")};{print}' lex.yy.c > lex.yy.c.new
Related
I'm trying to build the HEIF library in https://github.com/nokiatech/heif, but I'm having no luck.
I have CMake and the latest version of MinGW installed. I'm following the steps to build the library but I'm getting an error.
The first step, which is this:
cd heif/build
cmake --help
cmake ../srcs -G"<Generator listed by above command for your target platform>"
works, but the second step, which is this:
cmake --build .
seems to be working but when it gets to 41% done I get this error:
C:\Users\dantelo\Documents\heif-master\srcs\reader\heifstreamfile.cpp: In constructor 'HEIF::FileStream::FileStream(const char*)':
C:\Users\dantelo\Documents\heif-master\srcs\reader\heifstreamfile.cpp:44:9: error: 'fopen_s' was not declared in this scope
fopen_s(&m_file, filename, "rb");
^~~~~~~
C:\Users\dantelo\Documents\heif-master\srcs\reader\heifstreamfile.cpp:44:9: note: suggested alternative: 'fopen'
fopen_s(&m_file, filename, "rb");
^~~~~~~
fopen
reader\CMakeFiles\heif_static.dir\build.make:93: recipe for target 'reader/CMakeFiles/heif_static.dir/heifstreamfile.cpp.obj' failed
mingw32-make.exe[2]: *** [reader/CMakeFiles/heif_static.dir/heifstreamfile.cpp.obj] Error 1
mingw32-make.exe[2]: Leaving directory 'C:/Users/dantelo/Documents/heif-master/build'
CMakeFiles\Makefile2:233: recipe for target 'reader/CMakeFiles/heif_static.dir/all' failed
mingw32-make.exe[1]: *** [reader/CMakeFiles/heif_static.dir/all] Error 2
mingw32-make.exe[1]: Leaving directory 'C:/Users/dantelo/Documents/heif-master/build'
Makefile:85: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2
I'm on Windows 10 in case that's relevant. I have no idea why this is happening. Any help appreciated
It seems that fopen_s is only present in the C library provided by Microsoft, i.e. in MSVC. Source: Is there a way to use fopen_s() with GCC or at least create a #define about it?
Your best bet is then switching to MSVC, because the code you have was apparently never tested with MinGW, as it cannot be compiled by the latter.
Alternatively, if you are feeling lucky, you can just use some #define tricks to convert fopen_s to the standard fopen (see the answers in the linked question) and hope that this is the only incompatibility in the code.
I'm getting this error in all my app builds now and I can't seem to figure it out.
I am using the .xcworkspace file
I had to rename the app. Used: react-native-app-id ...
This morning I was able to build/run on emulator. I tried to setup xcode to run on an actual device and now the universe hates me.
I can't even react-native start and react-native run-ios without getting these errors:
ld: warning: directory not found for option '-L/Users/gmike/Projects/promiscue/tribeoffive/TribeOfFive/ios/build/Build/Products/Debug-iphonesimulator/React'
ld: library not found for -lReact
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld build/Build/Products/Debug-iphonesimulator/tribe-of-five.app/tribe-of-five normal x86_64
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/tribe-of-five.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/tribe-of-five.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
I've checked out a bunch of other stackoverflow articles.
I think this is telling:
Thoughts on how to un-mess up my env?
The error goes away when you remove libReact.a from the Xcode file tree (for me, it was under the Frameworks folder).
I also removed other files (they all had a transparent/white overlay on them which probably mean they were missing, actually couldn't open them in the finder neither)
Ok let's resolve this:
What to look for:
Here's a list of all the sub projects (or their products) that will cause XCode to throw that error when building a react-native project w/ cocoapods:
[
RCTActionSheet,
ART,
RCTBlob,
RCTCameraRoll,
RCTGeolocation,
RCTImage,
RCTLinking,
RCTAnimation,
RCTNetwork,
RCTPushNotification,
RCTTest,
RCTSettings,
RCTText,
RCTVibration,
RCTWebSocket,
]
Where to look for those weird project names:
First of all you'll look in the actual error message.
Here's a typical library not found error
Notice the ... /libART.a part?
That fellow is causing that error on my end.
In your case it can be any of the strings in the array above.
Found the troublemaker, what to do now?
Step 1: Remove the troublemaker project.
Let's try the lucky shot first:
Open the Project Navigator, and check if you can see the linked project that corresponds to the troublemaker string. In my case it was an XCode project called ART.
If you find it there, just remove it's reference, and you should be fine.
If that didn't work:
Open {Project Target} > Build Phases > Link binary with libraries and check wether you can see the troublemaker string in there. (It could be something like libArt.a depending on what's causing the issue on your end)
If that worked, forget the next step, otherwise move on:
Step 2: Delete the derived data directory, clean and rebuild
In my case (as seen in the raw error above) the derived data directory was /Users/sudoplz/Library/Developer/Xcode/DerivedData/MySuperApp-haxjchilyksewvdfcnnxwrulvyvy/Build/Products/Debug-iphonesimulator/
find yours in the error log, and delete it.
You can then clean XCode, shut it down, launch it again, and re-build.
Hopefully that should either fix the issue, or help you move on with fixing other stuff that may have gone wrong.
That's all folks.
Try to add that file to the libraries by finding libReact.a from the project, then clean and run Xcode.
or
Try to add libReact.a to your project "Build Phases" > Link binary with libraries, then clean and run Xcode.
I am following this link ( http://www.rsyslog.com/how-to-use-tcpflood/ ) to send messages to rsyslog.
I have cloned the git repository of rsyslog https://github.com/rsyslog/rsyslog.git
While following the link http://www.rsyslog.com/how-to-use-tcpflood/ , I am getting below error while executing "make tcpflood"
root1#atratus06:~/Debashish/rsyslog/tests$ make tcpflood
cc tcpflood.c -o tcpflood
tcpflood.c:86:20: fatal error: config.h: No such file or directory
#include "config.h"
^
compilation terminated.
make: *** [tcpflood] Error 1
Can you please help me with the error, your help will be really appreciated.
I had the same problem. Solution (or rather workaround) was to compile rsyslog...
Just go one directory up, and type:
./configure (you will need to probably install lot of missing stuff here...)
make
make install
After successfully completing all those actions you can go to 'tests' directory and once again type 'make tcpflood'. This time it will work.
I have a c++ program that performs actions with getline(cin,line). When I compile the .c file with g++, I usually just run
g++ lr.cc -o lr
./lr < text
Where text is a file.
However I'm getting an error and would like to debug where in the code the error is being generated (it's a terminate called after throwing an instance of 'char const*'
Aborted (core dumped) error) but I can't seem to get CLion to compile the code and have the text file be a "argument".
I tried editing the arguments to < test, using the full path < /path/to/text/ and also adding the file to the set(SOURCE_FILES) of the CMakeLists.txt.
Any help would be greatly appreciated!
Turns out they don't support it (yet?). Used
std::ifstream in("/path/to/file/to/read");
std::cin.rdbuf(in.rdbuf());
at the beginning of my function that read cin and started the debugger
I had an error like
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have searched, did all provided solution. but still same error. I have attached the screen shot of error page. Can anybody help me how to resolve this issue.
Thanks in Advance.
Does this link help?
http://discuss.cocos2d-x.org/t/library-not-found-for-lcurl/12035
In summary:
Caused by adding AdMob or Flurry to the project.
Check Build Settings > Library Search Paths and ensure that they are correctly rooted so they point to the correct libraries. Others had some success in removing the $(SRCROOT) bit and turning them into absolute paths.