Trying to build Microsoft REST SDK. Got errorious output:
1>d:\lb\cpprestsdk\release\include\cpprest\json.h(1386): error C2220: warning treated as error - no 'object' file generated
1>d:\lb\cpprestsdk\release\include\cpprest\json.h(1386): warning C4702: unreachable code
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
What is wrong there? Why there is no object file generated and how to fix it?
The project is set up to treat warnings as errors. To turn this off, go to the project properties page, Properties - General, and switch Treat Warnings as Errors from Yes (/WX) to No(/WX-).
This will allow the binaries to build. A better solution would be to amend the code to remove the warning but I haven't looked at the code long enough to propose a change.
Related
Upon upgrading my code to Xcode 10 and Swift 4.2 I can't build with my custom Objective C classes.
This is a sample error:
error: unable to open dependencies file (/Users/James/Library/Developer/Xcode/DerivedData/INDX-czfaxcphlmzffxehpjcbkopvgczo/Build/Intermediates.noindex/INDX01.build/Release-iphonesimulator/INDX01.build/Objects-normal/x86_64/MoreTableViewDataSource.d)Command CompileC emitted errors but did not return a nonzero exit code to indicate failure
Yes I deleted the derived data folder, cleaned, podded, etc, over and over again and check some flags for good measure.
Nothing changed just the upgrade. Thoughts?
Gave up. Converted those Objective C classes into swift. It compiles and runs now. Maybe Apple is being aggressive to weed out Objective C ?
When converting to use the new build system on Xcode 10, I get the following error in my output for several of my extension targets.
<unknown>:0: error: if any output files are specified, they all must be
Command CompileSwift failed with a nonzero exit code
I have looked for a solution online, but the only reference I can find to this error is in the Swift compiler source code itself.
https://www.google.com/search?q=error_if_any_output_files_are_specified_they_all_must_be
Does anyone know how this error is actually triggered, or what I can do to fix it?
Ok, I had the same problem with one of our projects. Building or Archiving are always stopped with the error <unknown>:0: error: if any output files are specified, they all must be.
The solution for us was to set Compilation Mode to Incremental instead of Whole Module.
This means, you have to ignore the Validate Project Settings warning:
I'm trying to install NOMINATIM, under the instruction
point first installation instructions for the team of Make getting following error:
Making all in osm2pgsql
/usr/local/bin/protoc-c --proto_path=protobuf --c_out=.
Missing input file.
*** Error code 1
Stop in /usr/home/ftpmpnik/mapnikdata/Nominatim-2.0.1/osm2pgsql.
*** Error code 1
Stop in /usr/home/ftpmpnik/mapnikdata/Nominatim-2.0.1.
I'd say you probably need to use GNU make (gmake); lots of software isn't properly tested with other make flavours.
If that's not the case please supply details - compiler and make version, configure/autoconf/automake versions if you're using them, etc.
I am compiling linux source code for android emulator. When i execute make command(for building and cross-compiling the linux source) i get the following error "pmem.c" file.
root#ubuntu:~/common# make
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
CC drivers/misc/pmem.o
drivers/misc/pmem.c:441: error: conflicting types for ‘phys_mem_access_prot’
/home/preetam/common/arch/x86/include/asm/pgtable.h:383: note: previous declaration of ‘phys_mem_access_prot’ was here
drivers/misc/pmem.c: In function ‘flush_pmem_file’:
drivers/misc/pmem.c:805: error: implicit declaration of function ‘dmac_flush_range’
drivers/misc/pmem.c: In function ‘pmem_setup’:
drivers/misc/pmem.c:1265: error: implicit declaration of function ‘ioremap_cached’
drivers/misc/pmem.c:1266: warning: assignment makes pointer from integer without a cast
make[2]: *** [drivers/misc/pmem.o] Error 1
make[1]: *** [drivers/misc] Error 2
make: *** [drivers] Error 2
root#ubuntu:~/common#
how to resolve this error. It seems that there may some problems in the "pmem.c" file and i'll have to choose different git repository. but that would be a very complex thing, as now i have already done most of the things till here. I might have to see correct version of this file. please someone tell what should i do?
how to solve this errors.
please help..thankyou!
There are several errors in the message you pasted, both conflicting types and implicit declarations. Three things that you might want to verify:
did you choose the correct processor architecture (ARCH) and cross compiler definition
does the chosen architecture mix in files from another arch (this is difficult to check, but you can start by checking the location of the files that are mentioned in the error message)
check these files themselves, to see it this is a bug (very unlikely, but you never know) and that you actually have to change some code
I am new to XCode and testing, and have followed the steps outlined in the iPhone Development Guide under "Unit Testing Applications".
I added a unit-test bundle to my project, named it "LogicTests", set it as the active target, then added a sample "LogicTests" unit-test class under a new group called "Tests". I wrote the simple one-line test from the doc (STFail(#"Must fail to succeed");), then tried to build my project.
I keep getting the errors: Command /bin/sh failed with exit code 1 and /Developer/Tools/RunPlatformUnitTests.include:448: error: Failed tests for architecture 'i386' (GC OFF).
The second error looks like the test is being run and failing properly, but the first error I am completely clueless about... What could the problem be here?
Thanks,
-Greta
Well this behavior is totally normal. If the unit test failed it will produce a return code of 1. Test the opposite with STTrue(1,#"some message") and it should not return 1 and finish sucessfully.
The test thinks your compiling for Intel not ARM architecture. Unfortunately, I can't remember off the top of my head how to set up the target properly.